Re: logging arguments to prepared statements?

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: rihad <rihad(at)mail(dot)ru>
Cc: "Ted Byers" <r(dot)ted(dot)byers(at)rogers(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: logging arguments to prepared statements?
Date: 2007-12-18 20:37:36
Message-ID: b42b73150712181237q5e317c24ue66985040b14f684@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Dec 18, 2007 12:14 PM, rihad <rihad(at)mail(dot)ru> wrote:
> Ted Byers wrote:
> > --- rihad <rihad(at)mail(dot)ru> wrote:
> >> Dec 18 15:49:41 myhost postgres[29832]: [35-1]
> >> ERROR: 23505: duplicate
> >> key value violates unique constraint "foo_key"
> >> Dec 18 15:49:41 myhost postgres[29832]: [35-4]
> >> INSERT INTO foo
> >> Dec 18 15:49:41 myhost postgres[29832]: [35-5]
> >> (a,b,c)
> >> Dec 18 15:49:41 myhost postgres[29832]: [35-7]
> >> VALUES ($1,$2,$3)
> >> Dec 18 15:49:41 myhost postgres[29832]: [35-8]
> >>
> >> And that's it, leaving me wondering which value
> >> triggered the error. Any
> > Why? It seems simple enough. You have a table called
> > foo, with at least three columns: a, b, and c. And
> > you have a violation of your unique constraint. If it
>
> I was wondering if there was a way to see the _values_ themselves in
> case of errors, as is possible with log_statements=all, without turning
> it on. Apparently there isn't. Thanks anyway.

which client api are you using? you can wrap the execution on the
client and log there.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-12-18 21:28:51 Re: combining semi-duplicate rows
Previous Message Bill Moran 2007-12-18 20:16:48 Re: multiple version installation in the same machine ????