Re: Getting value of bind variables - Mailing list pgsql-general

From Tom Lane
Subject Re: Getting value of bind variables
Date
Msg-id 6549.1313762640@sss.pgh.pa.us
Whole thread Raw
In response to Getting value of bind variables  (Jayadevan M <Jayadevan.Maymala@ibsplc.com>)
Responses Re: Getting value of bind variables
List pgsql-general
Jayadevan M <Jayadevan.Maymala@ibsplc.com> writes:
> I am trying to debug a query that gives an error. The error in the
> application server log is
> " ERROR: operator does not exist: timestamp without time zone = character
> varying

> It looks like the error is for the condition ( CUSINDINF.MEMDOB ) = ($4) ,
> memdob being a date of birth (timestamp) column. When I try the query at
> psql with some values, the data is retrieved OK. Is there some logging
> available in PostgreSQL that will tell me what values were actually used?

Yes, if you're using a reasonably recent version of Postgres ---
log_statements should provide that information.  However, it's 100%
irrelevant to this problem what the specific value is.  The problem is
that the application is declaring the *type* of $4 as varchar rather
than something appropriate.

            regards, tom lane

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Getting value of bind variables
Next
From: Andy Colson
Date:
Subject: Re: Getting value of bind variables