Re: [GENERAL] ROWTYPE initialization question

2006-11-16 Thread Jim Nasby
On Nov 15, 2006, at 2:07 AM, Alban Hertroys wrote: I suppose the real question is this: As it is not possible to initialize a %ROWTYPE type variable to NULL, is comparing it to NULL valid or is it comparing apples and oranges? Does it yield the expected result (true if the %ROWTYPE variabl

Re: [GENERAL] ROWTYPE initialization question

2006-11-15 Thread Alban Hertroys
Jim C. Nasby wrote: > On Thu, Nov 09, 2006 at 04:37:23PM +0100, Alban Hertroys wrote: >> 'lo list, >> >> I have a plpgsql SP where I loop through a cursor. I have an internal >> variable that keeps the previous row, so that I can compare it with the >> current row in the cursor. >> Like so; >> >>

Re: [GENERAL] ROWTYPE initialization question

2006-11-14 Thread Jim C. Nasby
On Thu, Nov 09, 2006 at 04:37:23PM +0100, Alban Hertroys wrote: > 'lo list, > > I have a plpgsql SP where I loop through a cursor. I have an internal > variable that keeps the previous row, so that I can compare it with the > current row in the cursor. > Like so; > > DECLARE > current table

[GENERAL] ROWTYPE initialization question

2006-11-09 Thread Alban Hertroys
'lo list, I have a plpgsql SP where I loop through a cursor. I have an internal variable that keeps the previous row, so that I can compare it with the current row in the cursor. Like so; DECLARE current table%ROWTYPE; previous table%ROWTYPE; BEGIN LOOP FETCH tableCur INTO