Re: function param problem in 7.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: frank_lupo <frank_lupo(at)email(dot)it>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: function param problem in 7.3
Date: 2003-03-10 14:57:57
Message-ID: 17240.1047308277@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"=?iso-8859-1?Q?frank=5Flupo?=" <frank_lupo(at)email(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Delao, Darryl W 2003-03-10 15:22:25 General Performance questions
Previous Message Robert Treat 2003-03-10 14:56:18 Re: Website main page empty