Re: [Patch] DB_DataObject and Postgres INSERT race conditionobtaininglast key
| From: | Matt Craig | Date: | Fri, 20 Oct 2006 12:40:49 +0000 |
| Subject: | Re: [Patch] DB_DataObject and Postgres INSERT race conditionobtaininglast key | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-44668@lists.php.net to get a copy of this message | ||
Sure, Alan, I can take care of it.
Matt
Alan Knowles wrote:
> Matt, do you want to look after that.
> Regards
> Alan
> Lukas Kahwe Smith wrote:
>
>>Alan Knowles wrote:
>>
>>
>>>>Anyways if you do the following you should already get this
>>>>information:
>>>>$mdb2->reverse->tableInfo($table_name);
>>>
>>>Yes, they point was to put the code to extract that into MDB/postgres
>>>driver, rather than weighing down the more generic layers.
>>>Something like
>>>pgsql.php / override getSequenceName
>>>
>>>function getSequenceName($sqn, $col = false)
>>>{
>>> if ($col == false) {
>>> return parent::getSequenceName($sqn);
>>> }
>>> $ti = $this->reverse->tableInfo($sqn);
>>> ... grab the col & parse the nextval();
>>>}
>>
>>Yeah that would be doable.
>>tableInfo() is kinda heavy though, since it calls
>>getTableFieldDefinition() for every column. Someone should probably
>>add a method that gets all the column definitions in a single query.
>>
>>But that is another story. Could you file this as a feature request?
>>
>>regards,
>>Lukas
>>
>
>