From: shyamperi@davlin.co.in
To: pgsql-admin@postgresql.org
Subject: Error with functions
Date: Sat, 20 Sep 2003 11:54:34 +0530 (IST)
Message-ID: <2753631.1064039518784.JavaMail.tomcat@mail.davlin.co.in> (raw)
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.
Attachments:Untitled1 (text/html, 1.2K) download
<head></head><body marginwidth=4 marginheight=4 topmargin=4 leftmargin=4><P><FONT face=verdana size=2>Hey,<BR>create or replace function sample(varchar,int) returns varchar as'<BR>declare<BR> data alias for $1;<BR> size alias for $2;<BR>begin<BR> return substr(data,(length(data)-size)+1,length(data));<BR>end;<BR>' language 'plpgsql';</FONT></P>
<P><FONT face=verdana size=2>____________________________<BR>WARNING: plpgsql: ERROR during compile of sample near line 2<BR>ERROR: parse error at or near ";"<BR><BR>Can any body tell me why is this error coming</FONT></P><PRE>-----
Warm Regards
Shÿam Peri
II Floor, Punja Building,
M.G.Road,
Ballalbagh,
Mangalore-575003
Ph : 91-824-2451001/5
Fax : 91-824-2451050
</PRE></body><br><br><b>
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.</b>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: shyamperi@davlin.co.in, pgsql-admin@postgresql.org
Subject: Re: Error with functions
In-Reply-To: <2753631.1064039518784.JavaMail.tomcat@mail.davlin.co.in>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox