<p>There was already support in progress for schemas in the flex backend,<br>
which is likely to replace the pgsql backend at some point. Until then,<br>
it's useful to be able to import data directly into a schema.</p>
<p>This is the original PR from Matt Amos with some changes from me: There<br>
are two different options now for setting the schema for the middle and<br>
the pgsql output, respectively. There are some docs and tests now.</p>
<p>This PR is an improved version of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="650024717" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/osm2pgsql/issues/1241" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/osm2pgsql/pull/1241/hovercard" href="https://github.com/openstreetmap/osm2pgsql/pull/1241">#1241</a></p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/osm2pgsql/pull/1288'>https://github.com/openstreetmap/osm2pgsql/pull/1288</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Extended schema support to middle and pgsql/multi output</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-9b4fb00e47679c514f3485f1f31b07f9">docs/flex.md</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-d44437560d2a7e5f42f1bad332e2634d">docs/osm2pgsql.md</a>
(9)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-added0e699c20a170b5074495ff83c22">src/middle-pgsql.cpp</a>
(59)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-8fc678ba06a385b9b43fa2afc72e840c">src/options.cpp</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-e1c9ddc1756fbfc23ab4970762a3a928">src/options.hpp</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-a3e65ae6b86635f909c8ecd8ad1a12c1">src/output-multi.cpp</a>
(3)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-2775989ebde2a0178e22e1329ff70ee1">src/output-pgsql.cpp</a>
(3)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-4eaa4d157c8b98372ad84ef48547fa71">src/table.cpp</a>
(46)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-0e91df6bf8fec3052a24bca9a7af6b7e">src/table.hpp</a>
(3)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-5fdb05ac8e567978ef95cdeed5e2708f">tests/regression.py</a>
(23)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-534e625287cf03f1406cbacfbc2d30ba">tests/test-middle.cpp</a>
(19)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/osm2pgsql/pull/1288/files#diff-4ade99cc6ede8a78ea57ae8471951e02">tests/test-output-pgsql-schema.cpp</a>
(18)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/osm2pgsql/pull/1288.patch'>https://github.com/openstreetmap/osm2pgsql/pull/1288.patch</a></li>
<li><a href='https://github.com/openstreetmap/osm2pgsql/pull/1288.diff'>https://github.com/openstreetmap/osm2pgsql/pull/1288.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/pull/1288">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353UZCLZMZEGGMP6WHBLSKF3X7ANCNFSM4SLU3KZA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353Q4NYMX7527AZFJNMDSKF3X7A5CNFSM4SLU3KZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KWX7S3A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/pull/1288",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1288",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>