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 18:58:10 +1300
Message-ID: <416CC3F2.3010003@opencloud.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0410121550580.7695@leary.csoft.net>
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>
Kris Jurka wrote:
> I was testing this out a little and this doesn't produce the error I
> expected:
>
> CREATE FUNCTION g(int) RETURNS int AS 'SELECT 1;' LANGUAGE sql;
> CREATE FUNCTION g(float) RETURNS int AS 'SELECT 2;' LANGUAGE sql;
> SELECT g(NULL);
I think implicit casting is interfering here somehow.
With types that don't have implicit casts, you get ambiguity:
>> test=> CREATE FUNCTION h(line) RETURNS int AS 'SELECT 1;' LANGUAGE sql;
>> CREATE FUNCTION
>> test=> CREATE FUNCTION h(point) RETURNS int AS 'SELECT 2;' LANGUAGE sql;
>> CREATE FUNCTION
>> test=> SELECT h(NULL);
>> ERROR: function h("unknown") is not unique
>> HINT: Could not choose a best candidate function. You may need to add explicit type casts.
-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: <416CC3F2.3010003@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> <416CC3F2.3010003@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