Re: [ADMIN] Error with functions

Поиск
Список
Период
Сортировка
Искать
От
Jean-Michel Chabanne
Тема
Re: [ADMIN] Error with functions
Дата
Msg-id
3F6C01D4.7090000@free.fr
Ответ на
Error with functions (shyamperi@davlin.co.in)
Список
Дерево обсуждения
Re: Error with functions shyamperi@davlin.co.in
Re: [ADMIN] Error with functions Tom Lane <tgl@sss.pgh.pa.us>
shyamperi@davlin.co.in a écrit :

>Hey,
>create or replace function sample(varchar,int) returns varchar as'
>declare
>        data alias for $1;
>        size alias for $2;
>begin
>        return  substr(data,(length(data)-size)+1,length(data));
>end;
>' language 'plpgsql';
>____________________________
>WARNING:  plpgsql: ERROR during compile of sample near line 2
>ERROR:  parse error at or near ";"
>
>Can any body tell me why is this error coming
>-----
>Warm Regards
>Shÿam Peri
>
>II Floor, Punja Building,
>M.G.Road,
>Ballalbagh,
>Mangalore-575003 
>Ph : 91-824-2451001/5
>Fax : 91-824-2451050 
>
>
>DISCLAIMER: This message contains privileged and confidential information and is
>intended only for the individual named.If you are not the intended
>recipient you should not disseminate,distribute,store,print, copy or
>deliver this message.Please notify the sender immediately by e-mail if
>you have received this e-mail by mistake and delete this e-mail from
>your system.
>
>
> ------------------------------------------------------------------------
>
> Hey,
> create or replace function sample(varchar,int) returns varchar as'
> declare
>         data alias for $1;
>         size alias for $2;
> begin
>         return  substr(data,(length(data)-size)+1,length(data));
> end;
> ' language 'plpgsql';
>
> ____________________________
> WARNING:  plpgsql: ERROR during compile of sample near line 2
> ERROR:  parse error at or near ";"
>
> Can any body tell me why is this error coming
>
>-----
>Warm Regards
>Shÿam Peri
>
>II Floor, Punja Building,
>M.G.Road,
>Ballalbagh,
>Mangalore-575003 
>Ph : 91-824-2451001/5
>Fax : 91-824-2451050 
>
>
>  
>
>
>
> * DISCLAIMER: This message contains privileged and confidential 
> information and is intended only for the individual named.If you are 
> not the intended recipient you should not 
> disseminate,distribute,store,print, copy or deliver this 
> message.Please notify the sender immediately by e-mail if you have 
> received this e-mail by mistake and delete this e-mail from your system.*
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>  
>
Hi,

I juste did a copy/paste of your sample on my test DB. I didn't get any 
error message and the function works fine.

I run PostgreSQL 7.3.3



-- 
Jean-Michel Chabanne
77450 MONTRY (FRANCE)
48" 54' N - 2" 49' E
Powered by Linux


В списке pgsql-sql по дате отправления
От: Thilak babu
Дата:
От:
Дата:
Сообщение: Re: auto_increment
FAQ