Re: parser: parse error at or near "$1" - Mailing list pgsql-sql

From Oliver Elphick
Subject Re: parser: parse error at or near "$1"
Date
Msg-id 1029330179.28727.14.camel@linda
Whole thread Raw
In response to parser: parse error at or near "$1"  ("Sugandha Shah" <Sugandhas@cybage.com>)
List 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.Elphick@lfix.co.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
obtainmercy, and find grace to help in      time of need."           Hebrews 4:16 
 



pgsql-sql by date:

Previous
From: Masaru Sugawara
Date:
Subject: Re: Need Help for select
Next
From: Oliver Elphick
Date:
Subject: Re: Few Queries