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 [EMAIL PROTECTED] 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster