X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2932A32A8B1 for ; Wed, 13 Oct 2004 16:20:36 +0100 (BST) 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 25976-01 for ; Wed, 13 Oct 2004 15:20:25 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9060532BBA9 for ; Wed, 13 Oct 2004 16:20:25 +0100 (BST) 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 i9DFKJO0014847; Wed, 13 Oct 2004 11:20:20 -0400 (EDT) To: Oliver Jowett Cc: Kris Jurka , "pgsql-jdbc@postgresql.org" Subject: Re: tightening up on use of oid 0 In-reply-to: <416CF557.2040000@opencloud.com> References: <41660A56.5000107@opencloud.com> <4167BC1A.4070809@opencloud.com> <416C3E22.9080605@opencloud.com> <416CF557.2040000@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Wed, 13 Oct 2004 22:28:55 +1300" Date: Wed, 13 Oct 2004 11:20:19 -0400 Message-ID: <14846.1097680819@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/119 X-Sequence-Number: 11224 Oliver Jowett writes: > - "? IS NULL" breaks if the parameter is an untyped NULL (this was the > original issue -- in an off-list email --that made me look at this area) Hmm. The system doesn't complain if you do "select 'z' IS NULL". It knows that it doesn't have a hard idea about the datatype of 'z', but it also knows that it doesn't matter much. The reason that you are seeing a failure is that exec_parse_message() explicitly fails if any parameter datatypes remain UNKNOWN after parsing. I made it do that because I expected that client code would be unhappy to get UNKNOWN back as a "resolved" parameter datatype. Would you rather get that result or a failure? > - Functions taking 'anyarray' or 'anyelement' don't like untyped NULLs, > even if they are STRICT (ERROR: could not determine anyarray/anyelement > type because input has type "unknown") This you're just stuck with. There has to be some way to determine the actual datatype imputed to the function result, and if you supply an untyped parameter then there isn't. It hasn't got anything to do with whether the parameter is NULL or not. regards, tom lane