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