Diferences between functions criated in pg 8.0.4 and criated in pg 7.4.8

Поиск
Список
Период
Сортировка
От Alejandro Michelin Salomon \( Adinet \)
Тема Diferences between functions criated in pg 8.0.4 and criated in pg 7.4.8
Дата
Msg-id !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAhx491Ki2tUS42D/aMPFg1MKAAAAQAAAALwhX9W2JqU6uWOA6vENjuAEAAAAA@adinet.com.uy
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Tino Wildenhain
Дата:
Сообщение: Re: problem with compiling with readline library
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Diferences between functions criated in pg 8.0.4 and criated in pg 7.4.8