overloaded function question

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: pgsql-general(at)postgresql(dot)org
Subject: overloaded function question
Date: 2003-01-25 19:25:47
Message-ID: 20030125192547.GA8637@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

When I use the two argument version I don't have a similar problem.
There are cube(cube, float8) and cube(float8,float8) functions defined.
I do not get a error message when calling cube(1,2).

Is this a bug? Is there some other 'cube' function I am not remembering that
causes a conflict?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2003-01-25 19:26:41 Re: overloaded function question
Previous Message Tom Lane 2003-01-25 16:50:42 Re: hot to determine calculated fields (views)