From: | frank_lupo <frank_lupo(at)email(dot)it> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | function param problem in 7.3 |
Date: | 2003-03-10 07:54:48 |
Message-ID: | HBIWNC$040BB5C8BC7F1840CFE4063722126E9C@email.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have create a function in 7.2:
CREATE FUNCTION left(text,int2) RETURNS varchar AS '
DECLARE
BEGIN
RETURN substring($1,1,$2)::varchar;
END;'
language 'plpgsql';
I execute a function in 7.2:
test=# select left('pippo',2)\g
left
------
pi
(1 row)
I execute a function in 7.3:
test=# select left('pippo',2)\g
ERROR: Function left("unknown", integer) does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
test=# select left('pippo'::text,2::int2)\g
left
------
pi
(1 row)
why in 7.2 this function worked while in 7.3 it does not work?
Thanks
Bye !!
Frank Lupo (Wolf) !!
/\_ _/\
\ o o /
--ooo-----ooo---
--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f
Sponsor:
Interessi alti con Conto Arancio. Facile come cliccare qui.
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=661&d=10-3
From | Date | Subject | |
---|---|---|---|
Next Message | Manfred Koizar | 2003-03-10 08:40:16 | Re: advice on weighted random selection |
Previous Message | Dennis Björklund | 2003-03-10 07:31:02 | Re: foreign SERIAL keys in weak entity primary keys |