Re: plpgsql For SQLQuery Loop Flags Error

From: Rich Hall <rhall(at)micropat(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: plpgsql For SQLQuery Loop Flags Error
Date: 2003-12-18 15:14:25
Message-ID: 3FE1C451.5000708@micropat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I should play with your code, but I'm lazy.
1) lmfpLimit integer ALIAS for $3

is missing the trailing ";"
lmfpLimit integer ALIAS for $3;

2) VARCHAR variables need a length
curId varchar;
should be
curId varchar(100);

3) I have not seen this style of declaration, where the argument type is repeated from the function's argument list. This may be OK, but if nothing else helps maybe removing the type will help.
curTrackList char(15) ALIAS for $1;
sliceFile varchar ALIAS for $2;
lmfpLimit integer ALIAS for $3

>>
curTrackList char(15) ALIAS for $1;
sliceFile varchar ALIAS for $2;
lmfpLimit integer ALIAS for $3
mTrackDet RECORD;

lpmfSum integer := 0;
Sliced CONSTANT integer := 2;
curId varchar;
counter integer :=1 ;
>>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Doug McNaught 2003-12-18 15:32:04 Re: plpgsql Integer Concat To String
Previous Message Tom Lane 2003-12-18 15:11:33 Re: SELECT FOR UPDATE differs inside and outside a pl/pgsql