calling functions in select

From: Jakub Ouhrabka <jouh8664(at)ss1000(dot)ms(dot)mff(dot)cuni(dot)cz>
To: <pgsql-general(at)postgresql(dot)org>
Subject: calling functions in select
Date: 2002-04-24 06:47:06
Message-ID: Pine.LNX.4.33.0204240839180.15439-100000@u-pl1.ms.mff.cuni.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hubert depesz Lubaczewski 2002-04-24 07:07:56 problems with non-trust authentication methods in 7.3devel?
Previous Message Arnaud PERE 2002-04-24 06:22:25 Re: recursive subquery