Re: Getting value of bind variables
| От | Andy Colson |
|---|---|
| Тема | Re: Getting value of bind variables |
| Дата | |
| Msg-id | 4E4E6B5B.6040000@squeakycode.net обсуждение исходный текст |
| Ответ на | Getting value of bind variables (Jayadevan M <Jayadevan.Maymala@ibsplc.com>) |
| Ответы |
Re: Getting value of bind variables
|
| Список | pgsql-general |
On 8/19/2011 6:19 AM, Jayadevan M wrote: > Hell l, > 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 > Hint: No operator matches the given name and argument type(s). You might > need to add explicit type casts. > Position: 1274" > How can I get the value of the $1,$2 etc in the query? > WHERE MST.CMPCOD= $1 > AND UPPER ( CUSINDINF.FAMNAM )= UPPER ($2) > AND UPPER ( CUSINDINF.INITLS )= UPPER ($3) > AND ( CUSINDINF.MEMDOB ) = ($4) > AND MST.CUSNUM <> $5 > > 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? > As of now, I am trying with logging level set to debug5 in > postgresql.conf for all logging options. But what is the 'correct' > approach? > > Regards, > Jayadevan Not sure what the exact setting is, try: log_statement = 'all' I've never set the log_min_messages or log_min_error_statement, and I'm pretty sure I've seen values in my logs. -Andy
В списке pgsql-general по дате отправления: