From: Tomasz Myrta <jasiek@klaster.net>
To: shyamperi@davlin.co.in
Cc: pgsql-sql@postgresql.org
Subject: Re: Error with functions
Date: Sat, 20 Sep 2003 08:58:56 +0200
Message-ID: <3F6BFAB0.2010106@klaster.net> (raw)
In-Reply-To: <2753631.1064039518784.JavaMail.tomcat@mail.davlin.co.in>
References: <2753631.1064039518784.JavaMail.tomcat@mail.davlin.co.in>
> 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
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: jasiek@klaster.net, shyamperi@davlin.co.in
Subject: Re: Error with functions
In-Reply-To: <3F6BFAB0.2010106@klaster.net>
* 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