Diferences between functions criated in pg 8.0.4 and criated in pg 7.4.8 - Mailing list pgsql-general

From Alejandro Michelin Salomon \( Adinet \)
Subject Diferences between functions criated in pg 8.0.4 and criated in pg 7.4.8
Date
Msg-id !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAhx491Ki2tUS42D/aMPFg1MKAAAAQAAAALwhX9W2JqU6uWOA6vENjuAEAAAAA@adinet.com.uy
Whole thread Raw
Responses Re: Diferences between functions criated in pg 8.0.4 and criated in pg 7.4.8  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Diferences between functions criated in pg 8.0.4 and criated in pg 7.4.8  (Andreas Kretschmer <akretschmer@spamfence.net>)
List pgsql-general
Hi :

I criated some function in my pg 8.0.4, they function as spected.

But when i try tu criate this functions in my hosting that has pg 7.4.8, i
can not do.
I read documentation an i see some disferences.

This is one of original function that i try to criate :

CREATE OR REPLACE FUNCTION LEFT( sTexto CHARACTER VARYING, nPosFin INTEGER )
RETURNS "varchar" AS $$

BEGIN
    IF sTexto IS NULL OR nPosFin IS NULL OR nPosFin <= 0 THEN
        RETURN '';
    ELSE
        RETURN SUBSTR( sTexto, 1, nPosFin );
    END IF;
END;
$$ LANGUAGE plpgsql
CALLED ON NULL INPUT
SECURITY INVOKER;

Left is not part of postgresql functions. I am migrating a system does runs
in mysql to postgresql.
To make easy i create some mysql functions in pg/plsql.

How i need change, to get this function runing in pg 7.4.8 ?

Thanks in advnace.

Alejandro Michelin Salomon
Porto Alegre
Brasil

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 14/5/2006




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 14/5/2006


pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: problem with compiling with readline library
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Diferences between functions criated in pg 8.0.4 and criated in pg 7.4.8