Re: function param problem in 7.3

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: function param problem in 7.3
Дата
Msg-id 17240.1047308277@sss.pgh.pa.us
обсуждение исходный текст
Ответ на function param problem in 7.3  ("frank_lupo" <frank_lupo@email.it>)
Список pgsql-general
"=?iso-8859-1?Q?frank=5Flupo?=" <frank_lupo@email.it> writes:
> I have create a function in 7.2:
>
> CREATE FUNCTION left(text,int2) RETURNS varchar AS '

> I execute a function in 7.3:
>
> test=# select left('pippo',2)\g
> ERROR:  Function left("unknown", integer) does not exist

int4-to-int2 conversion is not implicit in 7.3.  You'd be better off to
declare the function as taking int --- declaring it as int2 was a useless
anti-optimization even in 7.2, seeing that substring() takes int not
int2.

            regards, tom lane

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