[OSM-dev] Data corruption :) II
Brett Henderson
brett at bretth.com
Thu Nov 27 03:39:28 GMT 2008
Simon Ward wrote:
> On Wed, Nov 26, 2008 at 02:26:27PM +0100, Frederik Ramm wrote:
>
>> I have never used that distinction for anything. It is implicit in the
>> object id anyway - any node that is less than the maximum id has existed
>> at some point in time because we have auto increments ;-) and any node
>> with a higher id that the maximum has never existed.
>>
>
> That a sequence is actually contiguous is a big assumption and probably
> dependent on the DBMS. What the current spec says is a different matter
> (I don’t know, SQL92 certainly doesn’t define sequences).
>
Yep, dependent on DB. Oracle for example will almost certainly not be
sequential. Rollbacks after id allocation will usually result in gaps.
But I'm curious why you would ever need to know if an id has existed? I
don't understand why deleted items are stored in the current tables.
From an osmosis perspective I've never had a need to know this type of
thing. Full information will always be in the history table anyway and
an attempt to use an id that has been used in the past will result in a
primary key violation due to version 1 already existing. Perhaps this is
not how rails works ...
More information about the dev
mailing list