Skip site navigation (1) Skip section navigation (2)

Re: log options

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: log options
Date: 2010-09-24 13:34:54
Message-ID: BLU0-SMTP90877A98238AF6A468DBAAAC620@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-novice
Tom Lane wrote:
> Frank Bax <fbax(at)sympatico(dot)ca> writes:
>> Is there a log option that will display the SQL statement triggering 
>> WARNING; without having to log *all* queries?
> 
> I think you want to set log_min_error_statement to warning.


Nice idea; except it does not work.  I tested it with this statement:

testing=> select '\r\n';
WARNING:  nonstandard use of escape in a string literal
LINE 1: select '\r\n';
                ^
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
  ?column?
----------
  \r

(1 row)

I'd like to see SQL in log; but log file contains only:
2010-09-24 09:31:48 EDT mcl mcl WARNING:  nonstandard use of escape in a 
string literal at character 8
2010-09-24 09:31:48 EDT mcl mcl HINT:  Use the escape string syntax for 
escapes, e.g., E'\r\n'.

I did restart backend after changing postgresql.conf

Frank

In response to

pgsql-novice by date

Next:From: lalebardeDate: 2010-09-24 13:59:15
Subject: Re: psql -c "select * from a-user-name-that-exist fails
Previous:From: Josh KupershmidtDate: 2010-09-24 13:34:03
Subject: Re: psql -c "select * from a-user-name-that-exist fails

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group