Re: Inspect values of prepared statements - Mailing list pgsql-admin

From bricklen
Subject Re: Inspect values of prepared statements
Date
Msg-id CAGrpgQ8swe5pG87jqumXaWgF30tJGNkYfsg4WM=U7DqDziA6Nw@mail.gmail.com
Whole thread Raw
In response to Re: Inspect values of prepared statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Inspect values of prepared statements  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-admin

On Mon, May 2, 2016 at 2:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
What I think we could do without too much trouble or overhead is to set
up errcontext data so that a failure like that could come with a CONTEXT
line like

ERROR:  invalid input syntax for type double precision: "A"
STATEMENT:  insert into x (a,b,c,d,e,f) VALUES ($1,$2,$3,$4,$5,$6)
CONTEXT: reading parameter $2 for statement "foo"

I'm curious whether that would be enough information to solve your
problem.

I ran into this same problem a couple weeks ago, your suggestion above would have supplied enough information to debug the invalid input without having to jump through hoops at the application side.


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inspect values of prepared statements
Next
From: "David G. Johnston"
Date:
Subject: Re: Inspect values of prepared statements