currval() within one statement
- From: silly_sad <sad(at)bankir(dot)ru>
- To: pgsql-sql(at)postgresql(dot)org
- Subject: currval() within one statement
- Date: Tue, 22 Jan 2008 10:16:30 +0300
- Message-id: <4795984E.7030904@bankir.ru> <text/plain>
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 ?
Home |
Main Index |
Thread Index