From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | <qradius(at)qnet(dot)com(dot)pe> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Problem with function |
Date: | 2001-11-08 19:18:00 |
Message-ID: | 20011108111458.Y53840-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 8 Nov 2001 qradius(at)qnet(dot)com(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Evelio Martínez | 2001-11-08 19:18:18 | How to migrate BLOBS between DB with less steps??? |
Previous Message | Jeff Davis | 2001-11-08 19:15:38 | Re: [HACKERS] PostgreSQL v7.2b2 Released |