note 14654 deleted from function.pg-exec by nlopess

From: Date: Sat, 26 Jun 2004 19:17:20 +0000
Subject: note 14654 deleted from function.pg-exec by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71815@lists.php.net to get a copy of this message
Note Submitter: kleptog@svana.org ---- Just a correction to the earlier post about currval(). It is completely irrelevent what else is happening. currval() always returns what was returned by the last nextval() *in the current session*. So, if you do a nextval() (even an implicit one due to SERIAL) and wait half an hour, currval() will return that number, even if there have been 3,000 transactions in the meantime. As for holes in your sequences, thats unavoidable. If holes were to be avoided in the above example, the database would have to stop all other nextval()s on that sequence until the transaction committed, not good. Besides, who cares about a few holes. You didn't really think a bunch of developers with one of the most advanced concurrency control systems would let you slip up on that.

« previous php.notes (#71815) next »