Re: Problem with function

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Problem with function
Дата
Msg-id 20011108111458.Y53840-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Problem with function  (qradius@qnet.com.pe)
Список pgsql-general
On Thu, 8 Nov 2001 qradius@qnet.com.pe wrote:

> Hi!
> Please ; i have a function denfined as:
>
> create function nr_renewLease(varchar(15),interval)
> returns integer as '
> DECLARE
>  local_address ALIAS FOR $1;
>  lease_duration ALIAS FOR $2;
> BEGIN
>   update nr_lease set expires=now()+lease_duration where
>   address=local_address;
> END;
> return 1;
> '
> language 'plpgsql';
>
> when I calle the functions as:
>
> select nr_renewLease('192.168.100.1','20 seconds');
>
> I get the follow error:
>
> ERROR:  Function 'nr_renewlease()' does not exist
>     Unable to identify a function that satisfies the given
> argument types
>     You may need to add explicit typecasts

Is it possible that you created it as "nr_renewLease" or used
an interface that did so?  If so, you need to double quote
the name on uses as well.  Also, when I tried it, the end and
return 1 needed to be swapped.



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: [HACKERS] PostgreSQL v7.2b2 Released
Следующее
От: Evelio Martínez
Дата:
Сообщение: How to migrate BLOBS between DB with less steps???