Re: overloaded function question

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: overloaded function question
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: overloaded function question