Re: Getting value of bind variables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jayadevan M <Jayadevan(dot)Maymala(at)ibsplc(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Getting value of bind variables
Date: 2011-08-19 14:04:00
Message-ID: 6549.1313762640@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jayadevan M <Jayadevan(dot)Maymala(at)ibsplc(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2011-08-19 14:04:20 Re: Getting value of bind variables
Previous Message Gauthier, Dave 2011-08-19 14:01:33 Need linux uid in pg-psql