Re: overloaded function question

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: overloaded function question
Date: 2003-01-25 19:26:41
Message-ID: 20030125112508.M50746-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-01-25 19:54:37 Re: overloaded function question
Previous Message Bruno Wolff III 2003-01-25 19:25:47 overloaded function question