Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0FDA52E4115 for ; Fri, 14 Dec 2007 12:18:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 35682-10 for ; Fri, 14 Dec 2007 12:18:12 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 327C72E413D for ; Fri, 14 Dec 2007 12:17:13 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lBEGHChw008047; Fri, 14 Dec 2007 11:17:12 -0500 (EST) To: Tom Duffey cc: pgsql-jdbc@postgresql.org Subject: Re: Slow query after upgrades In-reply-to: <7D15C939-3764-4D45-9070-352742142269@techbydesign.com> References: <3EB52707-C945-43D6-9B3F-15F3B228D6F6@techbydesign.com> <4761A221.80604@opencloud.com> <1d4e0c10712131358m4bbc3f57t7e33c6c8ad2b3710@mail.gmail.com> <435EC9B4-F3DD-4136-9070-93E0DBB94B3F@techbydesign.com> <1d4e0c10712131452l65841793r449eb3c7cffbf3a5@mail.gmail.com> <0116C2A9-8DB5-4EBE-A66B-BE7F2A11651C@techbydesign.com> <4761BACA.4020008@opencloud.com> <22413.1197588665@sss.pgh.pa.us> <4761C641.30308@opencloud.com> <23430.1197594201@sss.pgh.pa.us> <7D15C939-3764-4D45-9070-352742142269@techbydesign.com> Comments: In-reply-to Tom Duffey message dated "Fri, 14 Dec 2007 08:20:24 -0600" Date: Fri, 14 Dec 2007 11:17:12 -0500 Message-ID: <8046.1197649032@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/120 X-Sequence-Number: 17975 Tom Duffey 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