Re: Debugging SQL queries - Mailing list pgsql-general

From chris smith
Subject Re: Debugging SQL queries
Date
Msg-id 3c1395330605110614r5c09030coce8768c06f32101c@mail.gmail.com
Whole thread Raw
In response to Re: Debugging SQL queries  ("Nikolay Samokhvalov" <samokhvalov@gmail.com>)
List pgsql-general
On 5/11/06, Nikolay Samokhvalov <samokhvalov@gmail.com> wrote:
> From my point of view, more important problem is that log doesn't help
> to find the query (in other words, log message doesn't show context)

Yes it does.. but it depends on your logging setup.

in psql:

test=# blah;
ERROR:  syntax error at or near "blah" at character 1

my log shows:

... [9-1] LOG:  statement: blah;
... [10-1] ERROR:  syntax error at or near "blah" at character 1

Do you have:

log_statement = true

in your postgresql.conf ?

--
Postgresql & php tutorials
http://www.designmagick.com/

pgsql-general by date:

Previous
From: "Nikolay Samokhvalov"
Date:
Subject: Re: Debugging SQL queries
Next
From: Tom Lane
Date:
Subject: Re: Recovery problem with PostgreSQL