pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: tightening up on use of oid 0
Date: Wed, 13 Oct 2004 11:20:19 -0400
Message-ID: <14846.1097680819@sss.pgh.pa.us> (raw)
In-Reply-To: <416CF557.2040000@opencloud.com>
References: <41660A56.5000107@opencloud.com>
	<4167BC1A.4070809@opencloud.com>
	<Pine.BSO.4.56.0410120027040.9158@leary.csoft.net>
	<416C3E22.9080605@opencloud.com>
	<Pine.BSO.4.56.0410121550580.7695@leary.csoft.net>
	<416CF557.2040000@opencloud.com>

Oliver Jowett <oliver@opencloud.com> 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



view thread (20+ messages)  latest in thread

Message-ID: <14846.1097680819@sss.pgh.pa.us>
Permalink:  ../14846.1097680819@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14846.1097680819@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, oliver@opencloud.com, books@ejurka.com
  Subject: Re: tightening up on use of oid 0
  In-Reply-To: <14846.1097680819@sss.pgh.pa.us>
  References: <41660A56.5000107@opencloud.com> <4167BC1A.4070809@opencloud.com> <Pine.BSO.4.56.0410120027040.9158@leary.csoft.net> <416C3E22.9080605@opencloud.com> <Pine.BSO.4.56.0410121550580.7695@leary.csoft.net> <416CF557.2040000@opencloud.com> <14846.1097680819@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox