From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Kris Jurka <books(at)ejurka(dot)com> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: tightening up on use of oid 0 |
Date: | 2004-10-13 05:58:10 |
Message-ID: | 416CC3F2.3010003@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-10-13 09:28:55 | Re: tightening up on use of oid 0 |
Previous Message | Ulrich Meis | 2004-10-12 21:52:08 | Re: A solution to the SSL customizing problem |