calling functions in select - Mailing list pgsql-general

From Jakub Ouhrabka
Subject calling functions in select
Date
Msg-id Pine.LNX.4.33.0204240839180.15439-100000@u-pl1.ms.mff.cuni.cz
Whole thread Raw
Responses Re: calling functions in select  (Jakub Ouhrabka <jouh8664@ss1000.ms.mff.cuni.cz>)
List pgsql-general
hi,

i'd like to ask if these two pl/pgsql fragmets are always giving same
results:

1)
FOR lr_rec IN SELECT func(table.x, ...) FROM table,... WHERE ... LOOP
END LOOP;

2)
FOR lr_rec IN SELECT * FROM table,... WHERE ... LOOP
    li_x := func(lr_rec.x, ...);
END LOOP;

function func has some "side effects", e.g. inserting rows somewhere...

i think that 1) and 2) should be the same but i'd like to make sure..

thanks,

kuba



pgsql-general by date:

Previous
From: Hubert depesz Lubaczewski
Date:
Subject: problems with non-trust authentication methods in 7.3devel?
Next
From: "Raymond O'Donnell"
Date:
Subject: Re: delphi