Re: plpgsql For SQLQuery Loop Flags Error - Mailing list pgsql-bugs

From Rich Hall
Subject Re: plpgsql For SQLQuery Loop Flags Error
Date
Msg-id 3FE1C451.5000708@micropat.com
Whole thread Raw
In response to plpgsql For SQLQuery Loop Flags Error  (Puneet Paul <paulptech@yahoo.com>)
List 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.
Thismay 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 ;
>>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: SELECT FOR UPDATE differs inside and outside a pl/pgsql
Next
From: Tom Lane
Date:
Subject: Re: Urgent: Key constraints behaving weirdly