Re: logging arguments to prepared statements?
От | Merlin Moncure |
---|---|
Тема | Re: logging arguments to prepared statements? |
Дата | |
Msg-id | b42b73150712181237q5e317c24ue66985040b14f684@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: logging arguments to prepared statements? (rihad <rihad@mail.ru>) |
Список | pgsql-general |
On Dec 18, 2007 12:14 PM, rihad <rihad@mail.ru> wrote: > Ted Byers wrote: > > --- rihad <rihad@mail.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
В списке pgsql-general по дате отправления: