Re: Slow query after upgrades - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Slow query after upgrades
Date
Msg-id 8046.1197649032@sss.pgh.pa.us
Whole thread Raw
In response to Re: Slow query after upgrades  (Tom Duffey <tduffey@techbydesign.com>)
List pgsql-jdbc
Tom Duffey <tduffey@techbydesign.com> writes:
> On Dec 13, 2007, at 7:03 PM, Tom Lane wrote:
>> Yeah, no question.  Implicit casts to text strike again :-(.  He was
>> probably getting the wrong answers, not only a slow query.

> What do you think about adding type information to the log?  Something
> like:

> DETAIL:  parameters: $1 = '21001'::integer, $2 = '2007-12-11
> 22:22:45'::text

> or similar would have revealed the source of my problem earlier.

8.3 will already reveal your problem quicker ;-)

regression=# select now() < '2007-12-14 11:15:02.284223-05'::text;
ERROR:  operator does not exist: timestamp with time zone < text
LINE 1: select now() < '2007-12-14 11:15:02.284223-05'::text;
                     ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Tom Duffey
Date:
Subject: Re: Slow query after upgrades
Next
From: dmp
Date:
Subject: Re: how to set a PreparedStatement column of XML type in 8.3?