El Miércoles, 11 de Febrero de 2009, Brett Henderson escribió:
> > I'm importing brand new data, so populating the history tables is no big
> > deal.
>
> Perhaps I've misunderstood you but populating the history tables is very
> important.

I'm afraid we have a little misunderstanding here :-)

For *new* nodes/ways/relations, the only thing an importer has to do is insert 
one record in the {node|way|relation} table, and the *same* record in the 
current_{node|way|relation} table. And ensure that the version number is "1" 
in both records.

Inserting two entries per object and setting the version (AKA "populating the 
history tables") is, as you can see, no big deal. It got coded in a jiffy.


(I fail to see why we have to duplicate data here, anyway - I don't know 
whether it would be performance-wise to just store the historic information, 
and make the API fetch only the last version; or do as now, but not keeping 
the last version in the historic tables)


Cheers,
-- 
----------------------------------
Iván Sánchez Ortega <[email protected]>

Whenever you find that you are on the side of the majority, it is time
to reform.
                -- Mark Twain

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to