Error with functions

From: shyamperi(at)davlin(dot)co(dot)in
To: pgsql-admin(at)postgresql(dot)org
Subject: Error with functions
Date: 2003-09-20 06:24:34
Message-ID: 2753631.1064039518784.JavaMail.tomcat@mail.davlin.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

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.

Attachment Content-Type Size
Untitled1 text/html 1.2 KB

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tomasz Myrta 2003-09-20 06:58:56 Re: Error with functions
Previous Message Priya G 2003-09-19 22:15:12 postgres[20563]: [73256] FATAL 1: invalid length of startup packet

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-09-20 06:58:56 Re: Error with functions
Previous Message Oliver Elphick 2003-09-20 06:23:15 Re: auto_increment