No, the data is not corrupt, nor are there duplicate entries. Quite a few current_way_nodes are not getting deleted when they cease to be 'current', that is, once they're only history and no longer part of the current planet. <div>
<br></div><div>I asked earlier about what mechanism actually deletes current_way_nodes if marked for deletion (i think the tag is 'visible=false' but i might be mistaken) but nobody seemed to know - it seems the best route is to go through and delete those orphans, but I couldn't  write a single SQL query to do so efficiently and before writing a script to do it, I realized that the rails port doesn't really care if they're there, or if the constraint is created. <br>
<div><div><br></div><div>Jeff<br><br><div class="gmail_quote">On Tue, Jul 7, 2009 at 3:24 PM, Shaun McDonald <span dir="ltr"><<a href="mailto:shaun@shaunmcdonald.me.uk">shaun@shaunmcdonald.me.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5"><br>
On 7 Jul 2009, at 18:47, Joachim Zobel wrote:<br>
<br>
> Am Mittwoch, den 01.07.2009, 09:47 +1000 schrieb Brett Henderson:<br>
>> Jeffrey Warren wrote:<br>
>>> And along those lines, should we remove the foreign key constraints<br>
>>> from the schema, Brett, if they're not necessary and they cause<br>
>>> Osmosis imports to fail?<br>
>> I don't mind really.  I only make them available as a convenience so<br>
>> people don't need to run the rails migrations themselves.  I don't<br>
>> want<br>
>> to put much effort into maintaining them so I just leave them as is.<br>
>> Is<br>
>> this something you'd be interested in looking after?<br>
><br>
> I am somewhat confused, maybe I missed something. Either you can<br>
> recreate the constraint if the import is done or the data is<br>
> _corrupt_.<br>
><br>
> If you are loading a larger volume of data you probably want to drop<br>
> _all_ constraints and indexes before that, recreate some in the middle<br>
> and the rest afterwards.<br>
><br>
<br>
</div></div>Could it be that your constraint failures are due to a node/way/<br>
relation containing two keys that have different capitalisation?<br>
<font color="#888888"><br>
Shaun<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/dev" target="_blank">http://lists.openstreetmap.org/listinfo/dev</a><br>
</div></div></blockquote></div><br></div></div></div>