postgres=# show log_statement;log_statement ---------------ddl (1 row)postgres=# alter user zx encrypted password 'zx'; ALTER ROLE2018-04-15 22:59:30.959 EDT,"postgres","postgres",18398,"[local]",5ad41167.47de,4,"idle",2018-04-15 22:58:47 EDT,2/8,0,LOG,00000,"statement: alter user zx encrypted password 'zx';",,,,,,,,,"psql"
可以进行会话级别的修改:
postgres=# set log_statement = none; SET postgres=# show log_statement;log_statement ---------------none (1 row)
这种情况下修改用户密码,日志中不会再记录该操作:
postgres=# alter user zx encrypted password 'zx123'; ALTER ROLE