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
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;
>>
>>
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
'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