You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using set_user or set_user_u, it appears that log_statement is only set to 'all' if the user is escalating to a superuser. Reading the documents, it appears that the intent is log_statement is always set to 'all' as long as set_user.block_log_statement is set to true/on.
Shouldn't log_statement always be set to all?
$ psql -h localhost -d hrlab -U sec_user
psql (16.3 (Homebrew))
Type "help" for help.
hrlab=> show log_statement;
log_statement
none
(1 row)
hrlab=> select set_user_u('postgres');
set_user_u
OK
(1 row)
hrlab=# show log_statement;
log_statement
all
(1 row)
hrlab=# select reset_user();
reset_user
OK
(1 row)
hrlab=> show log_statement;
log_statement
none
(1 row)
hrlab=> select set_user_u('hrapp');
set_user_u
OK
(1 row)
hrlab=> show log_statement;
log_statement
none
(1 row)
hrlab=> select reset_user();
reset_user
OK
(1 row)
hrlab=> select set_user('hrapp');
set_user
OK
(1 row)
hrlab=> show log_statement;
log_statement
none
(1 row)
The text was updated successfully, but these errors were encountered:
According to 0c78666 the current behavior is correct. However, the documentation for the original behavior was incompletely deleted and later restored by mistake. See #85.
When using set_user or set_user_u, it appears that log_statement is only set to 'all' if the user is escalating to a superuser. Reading the documents, it appears that the intent is log_statement is always set to 'all' as long as set_user.block_log_statement is set to true/on.
Shouldn't log_statement always be set to all?
$ psql -h localhost -d hrlab -U sec_user
psql (16.3 (Homebrew))
Type "help" for help.
hrlab=> show log_statement;
log_statement
none
(1 row)
hrlab=> select set_user_u('postgres');
set_user_u
OK
(1 row)
hrlab=# show log_statement;
log_statement
all
(1 row)
hrlab=# select reset_user();
reset_user
OK
(1 row)
hrlab=> show log_statement;
log_statement
none
(1 row)
hrlab=> select set_user_u('hrapp');
set_user_u
OK
(1 row)
hrlab=> show log_statement;
log_statement
none
(1 row)
hrlab=> select reset_user();
reset_user
OK
(1 row)
hrlab=> select set_user('hrapp');
set_user
OK
(1 row)
hrlab=> show log_statement;
log_statement
none
(1 row)
The text was updated successfully, but these errors were encountered: