Re: parser: parse error at or near "$1"

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Sugandha Shah <Sugandhas(at)cybage(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: parser: parse error at or near "$1"
Date: 2002-08-14 13:02:59
Message-ID: 1029330179.28727.14.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 2002-08-14 at 13:26, Sugandha Shah wrote:
> Hi ,
> I'm getting this error :
>
> Error occurred while executing PL/pgSQL function ins_schedule_status
> line 42 at SQL statement
> parser: parse error at or near "$1"
>
> Unable to locate the cause. Please any hint or clue will be of great help.
>
> Below is the function
>
>
> CREATE FUNCTION ins_schedule_status(int4,time without time zone,varchar(256),int2,int2,int2) RETURNS int4 AS '
> DECLARE
> schedule_id ALIAS FOR $1;
...
> insert into status_log ( log_id, computer_id,schedule_id,status,

schedule_id in the insert is a column name; the alias subsitutes $1 at
that point. You had better choose variable names that don't conflict
with anything else.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Let us therefore come boldly unto the throne of grace,
that we may obtain mercy, and find grace to help in
time of need." Hebrews 4:16

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Elphick 2002-08-14 13:10:46 Re: Few Queries
Previous Message Masaru Sugawara 2002-08-14 12:57:02 Re: Need Help for select