From: Oliver Jowett <oliver@opencloud.com>
To: 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 09:27:14 +1300
Message-ID: <416C3E22.9080605@opencloud.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0410120027040.9158@leary.csoft.net>
References: <41660A56.5000107@opencloud.com>
<4167BC1A.4070809@opencloud.com>
<Pine.BSO.4.56.0410120027040.9158@leary.csoft.net>
Kris Jurka wrote:
>
> On Sat, 9 Oct 2004, Oliver Jowett wrote:
>
>
>>Oliver Jowett wrote:
>>
>>>I am currently cleaning up a few places where OID 0 could get used as a
>>>parameter type (causing the backend to try to infer a type).
>>
>>Here is a patch to do this, including the PGobject changes to handle SQL
>>NULLs.
>>
>
>
> What I was suggesting before was a means to allow users to specify a pg
> type for the Types.OTHER case, but not to require it. I don't see the
> danger in allowing OID 0 in this case.
Ah, I thought you were OK with disallowing setNull(Types.OTHER)
entirely, I must have misunderstood what you said earlier.
I described one problem with allowing it in an earlier email:
>> Consider the case where you have two functions:
>>
>> foo(line)
>> foo(box)
>>
>> Executing "SELECT foo(?)" via PreparedStatement will work fine if you pass a non-null PGline or PGbox argument to setObject, but if you try to setNull() then you will get ambiguity between the two functions at execution time.
That's quite unpredictable behaviour.
> I know you are after complete
> strong typing, but I don't see the benefit while I do see the drawback.
What is the drawback? The only case that will change is the case that is
currently ambiguous. And there is a fairly simple mechanism for
disambiguating it via PGobject.
-O
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: oliver@opencloud.com, books@ejurka.com
Subject: Re: tightening up on use of oid 0
In-Reply-To: <416C3E22.9080605@opencloud.com>
References: <41660A56.5000107@opencloud.com> <4167BC1A.4070809@opencloud.com> <Pine.BSO.4.56.0410120027040.9158@leary.csoft.net> <416C3E22.9080605@opencloud.com>
* 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