Helo
is it expected that the currval() changes its value between calls within
one statement ?
Look the following call:
INSERT INTO ttt (a,b) SELECT currval('ttt_id_seq'), 'const' FROM ttt2;
Where the trigger before insert on ttt is defined and this trigger calls nextval('ttt_id_seq').
I was surprised having different values of currval() in ttt.a
Is this the normal behavior ? Where is it described ?