X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3D314D1B52A for ; Sat, 20 Sep 2003 06:59:50 +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 70642-10 for ; Sat, 20 Sep 2003 03:59:16 -0300 (ADT) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by svr1.postgresql.org (Postfix) with ESMTP id CDC4CD1B4E5 for ; Sat, 20 Sep 2003 03:59:13 -0300 (ADT) Received: from klaster.net (core-1.citynet.pl [80.48.135.69]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 258272B3D5; Sat, 20 Sep 2003 08:58:52 +0200 (CEST) Message-ID: <3F6BFAB0.2010106@klaster.net> Date: Sat, 20 Sep 2003 08:58:56 +0200 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; pl-PL; rv:1.5a) Gecko/20030718 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: shyamperi@davlin.co.in Cc: pgsql-sql@postgresql.org Subject: Re: Error with functions References: <2753631.1064039518784.JavaMail.tomcat@mail.davlin.co.in> In-Reply-To: <2753631.1064039518784.JavaMail.tomcat@mail.davlin.co.in> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/215 X-Sequence-Number: 15193 > 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 Really? I got no error and select sample('nothing',3) gave mi 'ing' What is your postgresql version? Regards, Tomasz Myrta