Is there a log option that will display the SQL statement triggering
WARNING; without having to log *all* queries?

2010-09-22 11:18:27 EDT WARNING: nonstandard use of escape in a string
literal at character 59
2010-09-22 11:18:27 EDT HINT: Use the escape string syntax for escapes,
e.g., E'\r\n'.

Search Discussions

  • Rob Richardson at Sep 23, 2010 at 12:34 pm
    By any wild chance, is your system running old Crystal Reports reports?
    Our product includes several reports, many of which were developed in
    previous versions of CR, and our Postgres logs are packed with error
    messages like that.

    RobR


    -----Original Message-----
    From: pgsql-novice-owner@postgresql.org
    On Behalf Of Frank Bax
    Sent: Thursday, September 23, 2010 6:37 AM
    To: pgsql-novice@postgresql.org
    Subject: [NOVICE] log options

    Is there a log option that will display the SQL statement triggering
    WARNING; without having to log *all* queries?

    2010-09-22 11:18:27 EDT WARNING: nonstandard use of escape in a string
    literal at character 59
    2010-09-22 11:18:27 EDT HINT: Use the escape string syntax for escapes,
    e.g., E'\r\n'.

    --
    Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) To make
    changes to your subscription:
    http://www.postgresql.org/mailpref/pgsql-novice
  • Tom Lane at Sep 23, 2010 at 4:42 pm

    Frank Bax 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.

    regards, tom lane
  • Frank Bax at Sep 24, 2010 at 1:35 pm

    Tom Lane wrote:
    Frank Bax <fbax@sympatico.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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedSep 23, '10 at 10:37a
activeSep 24, '10 at 1:35p
posts4
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase