Re: log_statement setting

From: Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: log_statement setting
Date: 2021-08-19 05:54:45
Message-ID: CAFS1N4i4hmq4UW6m2m7fjeA-NvHXN2P1jmJU2cVs4wgu6ucNuw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 18, 2021 at 9:36 PM Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> On Wed, Aug 18, 2021 at 09:34:08PM +0530, Jayadevan M wrote:
> > Hello all,
> >
> > A doubt on the setting 'log_statement'. Is it possible to set this at
> database
> > /user level?
>
> Sure, ALTER USER/DATABASE ... SET.
>
Thank you. Follow up question- If it is set to different values for
different users/databases, how can I get those values? For example,
I have a server with 4 databases. If I just query pg_settings, I get only
one value.

>
> > I get 'all' when I try
> > select * from pg_settings where name = 'log_statement'
> > Does this mean all statements by any user on any database in that server
> are
> > getting logged? This is for auditing purposes.
>
> Yes.
>
Thanks.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Julien Rouhaud 2021-08-19 06:10:55 Re: log_statement setting
Previous Message David G. Johnston 2021-08-19 04:44:40 Re: Serious Assistance with PostgreSQL True Infinite Arbitrary Precision Maths.