RE: [PEAR] MDB - insert query

From: Date: Fri, 07 Mar 2003 17:26:08 +0000
Subject: RE: [PEAR] MDB - insert query
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4093@lists.php.net to get a copy of this message
> From: Alexey Borzov [mailto:borz_off@cs.msu.su] > Sent: Friday, March 07, 2003 6:14 PM > To: Christian Karlsen > Cc: pear-general@lists.php.net > Subject: Re: [PEAR] MDB - insert query > > Christian Karlsen wrote: > > Ok! thanks for the quick response > > > > By the way, I think I've found a bug in currId() in pgsql.php. > > > > code: > > > > if (MDB::isError($result = $this->queryOne("SELECT last_value FROM > $seqname"))) > > Looks like you've found another bug as well. > SELECT last_value is a Bad Way of getting current value of PostgreSQL > sequence, there are possible concurrency problems. > The query should be "SELECT currval('$seqname')" Do you know if currval() is a new feature? This stuff is taken from the Metabase driver and I assume Manuel did it for a reason (he always does). This is the reason we don't use LIMIT either Regards, Lukas

« previous php.pear.general (#4093) next »