Re: Error with functions

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: shyamperi(at)davlin(dot)co(dot)in
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Error with functions
Date: 2003-09-20 06:58:56
Message-ID: 3F6BFAB0.2010106@klaster.net
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

Really?
I got no error and select sample('nothing',3) gave mi 'ing'
What is your postgresql version?

Regards,
Tomasz Myrta

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jean-Michel Chabanne 2003-09-20 07:29:24 Re: Error with functions
Previous Message shyamperi 2003-09-20 06:24:34 Error with functions

Browse pgsql-sql by date

  From Date Subject
Next Message shyamperi 2003-09-20 07:00:42 Re: Error with functions
Previous Message shyamperi 2003-09-20 06:24:34 Error with functions