overloaded function question

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема overloaded function question
Дата
Msg-id 20030125192547.GA8637@wolff.to
обсуждение исходный текст
Ответы Re: overloaded function question  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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?

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: hot to determine calculated fields (views)
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: overloaded function question