#22761 [NEW]: nextId does not create the sequence within transaction

From: Date: Tue, 18 Mar 2003 12:38:17 +0000
Subject: #22761 [NEW]: nextId does not create the sequence within transaction
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14393@lists.php.net to get a copy of this message
From: zubchenko at alarit dot com Operating system: Linux PHP version: 4.3.0 PHP Bug Type: PEAR related Bug description: nextId does not create the sequence within transaction We are using PostrgreSQL 7.3 with PHP 4.2.3 in our project. We have discovered that when calling nextId with name of non-existent sequence we get NULL as result without any error. In pgAdmin all is fine. It happens only within transaction. Here is example of code: //opening connection to DB with DB class $res = $db->query('BEGIN'); if (DB::isError($res)) { die(trigger_error($res->getMessage() ." : ".$res->getUserInfo(),E_USER_ERROR)); } debug($db->nextId('some_non_existing_seq')); $res = $db->query('COMMIT'); if (DB::isError($res)) { die(trigger_error($res->getMessage() ." : ".$res->getUserInfo(),E_USER_ERROR)); } //closing connection This code results in NULL output from debug and nothing else. -- Edit bug report at http://bugs.php.net/?id=22761&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22761&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22761&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22761&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22761&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22761&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22761&r=support Expected behavior: http://bugs.php.net/fix.php?id=22761&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22761&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22761&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22761&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22761&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22761&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22761&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22761&r=gnused

« previous php.pear.dev (#14393) next »