xxxxxxxxxx
43.9.1. Reporting Errors and Messages
Use the RAISE statement to report messages and raise errors.
RAISE [ level ] 'format' [, expression [, ]] [ USING option = expression [, ] ];
RAISE [ level ] condition_name [ USING option = expression [, ] ];
RAISE [ level ] SQLSTATE 'sqlstate' [ USING option = expression [, ] ];
RAISE [ level ] USING option = expression [, ];
RAISE ;
xxxxxxxxxx
error postgres
1. sudo -u postgres psql # enter sql
2. SHOW hba_file;
3. sudo nano /path/to/pg_hba.conf
4. add password to user:postgres with password:postgres5
5. change from
# TYPE DATABASE USER ADDRESS METHOD
local all postgres peer
6. to
# TYPE DATABASE USER ADDRESS METHOD
local all postgres md5
7. sudo systemctl restart postgresql
8. psql -U postgres -h localhost -d postgres
9. use username:postgres password:postgres to your app