On 12/10/2015 09:58 AM, oleg yusim wrote:
Greetings!
I'm new to PostgreSQL, working on it from the point of view of Cyber
Security assessment. In regards to the here is my question:
Is it a way to enable logging for psql prompt meta-commands, such as
\du, \dp, \z, etc?
aklaver@killi:~> psql -d test -E
psql (9.4.4)
Type "help" for help.
aklaver@test=> \du
********* QUERY **********
SELECT r.rolname, r.rolsuper, r.rolinherit,
r.rolcreaterole, r.rolcreatedb, r.rolcanlogin,
r.rolconnlimit, r.rolvaliduntil,
ARRAY(SELECT b.rolname
FROM pg_catalog.pg_auth_members m
JOIN pg_catalog.pg_roles b ON (m.roleid = b.oid)
WHERE m.member = r.oid) as memberof
, r.rolreplication
FROM pg_catalog.pg_roles r
ORDER BY 1;
**************************
postgresql.conf
log_statement = 'all'
aklaver-2015-12-10 10:12:45.177 PST-0LOG: statement: SELECT r.rolname,
r.rolsuper, r.rolinherit,
r.rolcreaterole, r.rolcreatedb, r.rolcanlogin,
r.rolconnlimit, r.rolvaliduntil,
ARRAY(SELECT b.rolname
FROM pg_catalog.pg_auth_members m
JOIN pg_catalog.pg_roles b ON (m.roleid = b.oid)
WHERE m.member = r.oid) as memberof
, r.rolreplication
FROM pg_catalog.pg_roles r
ORDER BY 1;
Thanks,
Oleg
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general