<p dir="auto">(Changes to) Properties are stored at a later time in the database so the db is not changed if osm2pgsql fails for some reason. Basically we are trying to do as many checks as possible before actually writing the properties to the db. For instance the input file is now actually opened before properties are written,</p>
<p dir="auto">This solves some cases already mentioned in PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1910167454" data-permission-text="Title is private" data-url="https://github.com/osm2pgsql-dev/osm2pgsql/issues/2085" data-hovercard-type="pull_request" data-hovercard-url="/osm2pgsql-dev/osm2pgsql/pull/2085/hovercard" href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2085">#2085</a>.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244'>https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/commits/01f5ed222bf4e8885f23ebda35f77bfb94b38603" class="commit-link">01f5ed2</a> Simplify property handling and do updates all at once</li>
<li><a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/commits/2bd778d431ba8235e9cd776c0367cc1458fa29a4" class="commit-link">2bd778d</a> Check that properties can be loaded in osmp2glsq-gen</li>
<li><a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/commits/451b2e9981cccfa244b0b8ba97fb34969bfc9ae4" class="commit-link">451b2e9</a> Store properties in database only later after more checks</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/files">5 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/files#diff-af990b4913ef709327b65c38b7aa4719b2caaed25de91ebd7496daf528ac8386">src/gen/osm2pgsql-gen.cpp</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/files#diff-1c22a1a384d93c9c91ca44a67a64253a976fa3dc112e87596046baf9007abbf6">src/osm2pgsql.cpp</a>
(33)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/files#diff-33f6f98ac38892c5010da188eedbbf64d4647116b43cfcf22a6522d2195dc5de">src/properties.cpp</a>
(69)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/files#diff-409bf9b04336636af7e951123603d529e84cf35f6eaf6bb14258d5d7c8e39788">src/properties.hpp</a>
(29)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244/files#diff-576869d8d1ddb7bb432fe39c002e3c2046fc495a8679f91458823be2eadd5b52">tests/test-properties.cpp</a>
(19)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244.patch'>https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244.patch</a></li>
<li><a href='https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244.diff'>https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244.diff</a></li>
</ul>
<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/2244">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353SKXPNPN3FFVAFAJCLZWWKVFAVCNFSM6AAAAABOH32SMSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZDMOJTHE3DCMI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353VA2V342R3MBVNWI3LZWWKVFA5CNFSM6AAAAABOH32SMSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJNHQJ3M.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/2244</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/2244",
"url": "https://github.com/osm2pgsql-dev/osm2pgsql/pull/2244",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>