Re: FW: Single Line Query Logging - Mailing list pgsql-general

From Albe Laurenz
Subject Re: FW: Single Line Query Logging
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17C1C5F8@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to FW: Single Line Query Logging  (Emre ÖZTÜRK <emreozturk@outlook.com>)
List pgsql-general
Emre ÖZTÜRK wrote:

> I have sent below question months ago but I could not get any reply from you experts. I will very
> appreciated if you can help.
> 
> PS: I have tried debug_pretty_print = off but I did not work.

> Is there a parameter to log any SQL query as a single line in audit logs? I have some problems in my
> SIEM application. If a DBA sends the query as a single line I can gather the whole query, but if he
> enters like
> 
> UPDATE x  .......
>           y=Z ......
>           where ......
> 
> I only get the line starts with UPDATE then I can not see what is really changed in my SIEM logs. I
> have heard that there is a parameter do what I mean. Do you agree?

There is no way to modify queries like that in the PostgreSQL log.

You can set log_destination = 'csvlog' to get a PostgreSQL log in CSV
format that can be parsed more easily.

I don't know what the "SIEM logs" are that you talk about.
If they log only part of the query, I'd say that they are broken
and should be fixed.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "ascot.moss@gmail.com"
Date:
Subject: Re: invalid resource manager ID in primary checkpoint record
Next
From: Giuseppe Broccolo
Date:
Subject: Re: plpgsql code doen't work