Re: FW: Single Line Query Logging

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: Emre ÖZTÜRK *EXTERN* <emreozturk(at)outlook(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: FW: Single Line Query Logging
Date: 2013-09-10 09:28:09
Message-ID: A737B7A37273E048B164557ADEF4A58B17C1C5F8@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Giuseppe Broccolo 2013-09-10 10:37:36 Re: plpgsql code doen't work
Previous Message ascot.moss@gmail.com 2013-09-10 09:05:06 Re: invalid resource manager ID in primary checkpoint record