[development] auto_increment

Gerhard Killesreiter gerhard at killesreiter.de
Mon Dec 12 22:46:11 UTC 2005


Karoly Negyesi wrote:

> On Mon, 12 Dec 2005 22:35:11 +0100, Gerhard Killesreiter  
> <gerhard at killesreiter.de> wrote:
>
>> Nicolas Tostin wrote:
>>
>>>>> Btw, due to the chaotic use of sequences table (sometime it's used,
>>>>> sometimes not)
>>>>>
>>>> When not?
>>>>
>>>>
>>>
>>> I don't have an exact list, but I remember having found some 
>>> examples,  so I
>>> understood that it was better handling them by DB trigger (for 
>>> Oracle  schema
>>> I mean) than doing nothing .
>>>
>>
>> The general scheme is that we use locking if we want to know the ID 
>> in  advance or if we need it afterwards for further processing 
>> (example:  node iD).
>
>
> There are facilities that return the last ID on a per connection basis 
> for  pgsql & mysql.


Right. I still prefer to get the nid in advance. It just feels safer. :p
Also, caring about LOCK permissions is not of much use as long as 
search.module uses temporary tables...

Also, if we really want to make Drupal take care of simultaneous 
attempts to edit the same piece of stuff we probably need to introduce 
locking and or transactions anyway. So please, don't let poor hosting 
service stand in the way of Drupal's advancement.

Cheers,
    Gerhard

> As long as we do not use pconnect , we are fine. Those that  use 
> pconnect are advanced enough to introduce locking.




More information about the development mailing list