note 46964 added to function.pg-last-oid

From: Date: Thu, 28 Oct 2004 18:02:50 +0000
Subject: note 46964 added to function.pg-last-oid
Groups: php.notes 
Request: Send a blank email to php-notes+get-79285@lists.php.net to get a copy of this message
There seems to be some confusion about the PostgreSQL currval() function in these notes. currval() isn't a general-purpose access to sequences, it has a very specific function. From the PostgreSQL User's Guide (v 7.3.2) section 6.11: currval - Return the value most recently obtained by nextval in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Notice that because this is returning a session-local value, it gives a predictable answer even if other sessions are executing nextval meanwhile. So wrapping a nextval (or other sequence insert) followed by currval in a transaction is not necessary. ---- Manual Page -- http://www.php.net/manual/en/function.pg-last-oid.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46964 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46964&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46964&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46964&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46964&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46964&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46964&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46964&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79285) next »