Search Postgresql Archives

Re: logging arguments to prepared statements?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 18, 2007 12:14 PM, rihad <rihad@xxxxxxx> wrote:
> Ted Byers wrote:
> > --- rihad <rihad@xxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux