function param problem in 7.3 - Mailing list pgsql-general

From frank_lupo
Subject function param problem in 7.3
Date
Msg-id HBIWNC$040BB5C8BC7F1840CFE4063722126E9C@email.it
Whole thread Raw
Responses Re: function param problem in 7.3
List 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

pgsql-general by date:

Previous
From: Dennis Björklund
Date:
Subject: Re: foreign SERIAL keys in weak entity primary keys
Next
From: Manfred Koizar
Date:
Subject: Re: advice on weighted random selection