Re: function param problem in 7.3 - Mailing list pgsql-general

From Tom Lane
Subject Re: function param problem in 7.3
Date
Msg-id 17240.1047308277@sss.pgh.pa.us
Whole thread Raw
In response to function param problem in 7.3  ("frank_lupo" <frank_lupo@email.it>)
List 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 by date:

Previous
From: Robert Treat
Date:
Subject: Re: Website main page empty
Next
From: "Delao, Darryl W"
Date:
Subject: General Performance questions