<p></p>
<blockquote>
<p dir="auto">I am worried though that people will just get into the habit of using <code class="notranslate">--force</code> and then it didn't buy us much.</p>
</blockquote>
<p dir="auto">I'm not too worried about other people's habits. ðŸ˜„ Seriously though, I think if there's a good error message (Error: Cannot import because of existing data.  Run with <code class="notranslate">--force</code> to override) people will default to the "safe" approach especially if that's what the docs recommend.  It's easy enough to re-run and add the additional switch when force is needed.</p>
<blockquote>
<p dir="auto">I created this because I have been bitten twice already with this recently. ... So it is easy to clobber that table with an invalid osm2pgsql command line.</p>
</blockquote>
<p dir="auto">I ran into this exact problem in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1674034203" data-permission-text="Title is private" data-url="https://github.com/rustprooflabs/pgosm-flex/issues/313" data-hovercard-type="issue" data-hovercard-url="/rustprooflabs/pgosm-flex/issues/313/hovercard" href="https://github.com/rustprooflabs/pgosm-flex/issues/313">rustprooflabs/pgosm-flex#313</a>, I do like the default-safe option.  I think this type of protection is a good idea. However, if it's decided not to add this type of check I am also okay.  I run essentially all of my OSM imports via PgOSM Flex and have already added the protection I want there.  If it's added here, I just need to update to pass that new option along to osm2pgsql appropriately.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2085#issuecomment-1734626221">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353SAJNZ4PULUGQ2NIF3X4ILOXANCNFSM6AAAAAA5EZ66OA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353UDCZGR37T547R7IZLX4ILOXA5CNFSM6AAAAAA5EZ66OCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTHMRF22.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><osm2pgsql-dev/osm2pgsql/pull/2085/c1734626221</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/osm2pgsql-dev/osm2pgsql/pull/2085#issuecomment-1734626221",
"url": "https://github.com/osm2pgsql-dev/osm2pgsql/pull/2085#issuecomment-1734626221",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>