X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 49242D1B53F; Sat, 20 Sep 2003 06:49:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 81271-01; Sat, 20 Sep 2003 03:49:07 -0300 (ADT) Received: from davlin.co.in (ns.vasnet.net.in [202.4.160.11]) by svr1.postgresql.org (Postfix) with ESMTP id A5920D1B4E5; Sat, 20 Sep 2003 03:49:04 -0300 (ADT) Received: from Application (unknown [202.4.160.30]) by davlin.co.in (Postfix) with ESMTP id B85AE14B70; Sat, 20 Sep 2003 11:54:34 +0530 (IST) Message-ID: <2753631.1064039518784.JavaMail.tomcat@mail.davlin.co.in> From: shyamperi@davlin.co.in To: pgsql-admin@postgresql.org To: pgsql-sql@postgresql.org Subject: Error with functions Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_163_7194891.1064039518632" Date: Sat, 20 Sep 2003 11:54:34 +0530 (IST) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/326 X-Sequence-Number: 10414 ------=_Part_163_7194891.1064039518632 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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=FFam Peri II Floor, Punja Building, M.G.Road, Ballalbagh, Mangalore-575003=20 Ph : 91-824-2451001/5 Fax : 91-824-2451050=20 DISCLAIMER: This message contains privileged and confidential information a= nd 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. ------=_Part_163_7194891.1064039518632 Content-type: text/html Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=Untitled1

Hey,
create or replace function s= ample(varchar,int) returns varchar as'
declare
   &nbs= p;    data alias for $1;
     &n= bsp;  size alias for $2;
begin
     &nb= sp;  return  substr(data,(length(data)-size)+1,length(data));
= end;
' language 'plpgsql';

____________________________
WARNING:&n= bsp; plpgsql: ERROR during compile of sample near line 2
ERROR:  pa= rse error at or near ";"

Can any body tell me why is this error comi= ng

-----
Warm Regards
Sh=FFam Peri

II Floor, Punja Building,
M.G.Road,
Ballalbagh,
Mangalore-575003=20
Ph : 91-824-2451001/5
Fax : 91-824-2451050=20




DISCLAIMER: This message contains privileged and confidential information a= nd 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. ------=_Part_163_7194891.1064039518632--