Re: [Patch] DB_DataObject and Postgres INSERT race conditionobtaining last key

From: Date: Wed, 18 Oct 2006 07:03:04 +0000
Subject: Re: [Patch] DB_DataObject and Postgres INSERT race conditionobtaining last key
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-44614@lists.php.net to get a copy of this message
the issue is slightly different from the original thread. not knowing MDB2, you may have solved it. but here goes the summary: DataObjects needs to know the sequence name for a table, so it can fetch the last inserted id. in the old PEAR::DB world, it called getSequenceKey($table), which usually just returned the tablename, reformatted with %s_seq (from what I remember). However, in the brave new world of MDB2, The hope is that getSequenceKey($table) would actually use something like tableInfo(), look at the flags, and return the 'real' sequence key', as defined by nextval() etc. Regards Alan Lukas Kahwe Smith wrote: > Alan Knowles wrote: >> I think this should code (or something similar) should really be in the >> getSequenceName() of MDB2 - Lukas may be able to shed some light on >> that. > > Err, could someone explain to me what the issue is? The thread is > kinda long ... > > regards, > Lukas >

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