X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D34F1D7B90 for ; Tue, 8 Nov 2005 14:52:46 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81180-10 for ; Tue, 8 Nov 2005 18:52:44 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id D83F8D7A05 for ; Tue, 8 Nov 2005 14:52:44 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jA8Iq62X007621; Tue, 8 Nov 2005 13:52:06 -0500 (EST) To: Kris Jurka Cc: Dave Cramer , List Subject: Re: use of OID.Unknown In-reply-to: References: <22E34B35-1D29-4DCD-BF81-8AF3CFEAC94B@fastcrypt.com> Comments: In-reply-to Kris Jurka message dated "Tue, 08 Nov 2005 13:36:05 -0500" Date: Tue, 08 Nov 2005 13:52:05 -0500 Message-ID: <7620.1131475925@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/58 X-Sequence-Number: 14156 Kris Jurka writes: > I don't think this is a simple switch we should throw in a minor revision > either. The real source of our problems is that for performance reasons > we never issue a Describe Statement protocol message. No, I don't think that's the issue; the part that I'm worried about is this one: > Finally there are a few cases where the server simply cannot resolve the > provided type and bails out with an error message. If using the JDBC > setXXX provided types, these work. Consider "SELECT ? IS NULL" or an > overloaded function that cannot be resolved. Sending UNKNOWN creates a risk that the server will barf because it can't guess the right data type. Now, if you are proposing to send a parameter marked UNKNOWN in exactly the same cases where the previous driver release would have sent an undecorated string literal, then I'm mostly OK with it --- the behavior at least won't be a regression, because an undecorated string literal is also taken as UNKNOWN to start with. I remembered what it was that was nagging me about having seen this before --- didn't we try using UNKNOWN to avoid having to choose between timestamp with/without time zone, and didn't that idea crash and burn? It'd be a good idea to go back and look at the details before thinking of adopting UNKNOWN in a more general context. regards, tom lane