Re: Logging database and statement with errors

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Logging database and statement with errors
Date: 2004-04-07 04:07:24
Message-ID: 200404070407.i3747Og23347@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

CSN wrote:
> I'm getting a bunch of these in my log:
>
> 2003-11-22 21:00:00 ERROR: syntax error at or near
> "s" at character 87
>
> I think there might be an unescaped ' getting through.
> Is there a way to have the database and statement show
> up along with the error? log_statements appears to log
> every statement.

Sure, Does your version have log_min_error_statement? If so, just set
it to 'error' in postgresql.conf, pg_ctl reload, and you should see the
statements.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-04-07 04:09:35 Re: Cursors and Transactions, why?
Previous Message Andrew Sullivan 2004-04-07 03:59:02 Re: Can we have time based triggers in Postgresql??