Re: overloaded function question - Mailing list pgsql-general

From Stephan Szabo
Subject Re: overloaded function question
Date
Msg-id 20030125112508.M50746-100000@megazone23.bigpanda.com
Whole thread Raw
In response to overloaded function question  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: overloaded function question
List pgsql-general
On Sat, 25 Jan 2003, Bruno Wolff III wrote:

> I am working on the regression tests for a couple of new 'cube' functions
> for build cubes from float8s and I am seeing an unexpected failure to
> implicitly cast int's to float8 in some, but not all cases.
> For example:
> area=# select cube(2::float);
>  cube
> ------
>  (2)
> (1 row)
>
> area=# select cube(2::int);
> ERROR:  Function cube(integer) does not exist
>         Unable to identify a function that satisfies the given argument types
>         You may need to add explicit typecasts
>
> There are both cube(text) and cube(float8) functions defined.

Since int4 can implicitly convert to text and float8, I think cube(int4)
is ambiguous.  cube(float4) probably will fail as well.



pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: overloaded function question
Next
From: Bruno Wolff III
Date:
Subject: Re: overloaded function question