<p></p>
<blockquote>
<p dir="auto">Therefore, a function <code>make_filter_tags_func</code> to filter only the desired tags would be useful?</p>
</blockquote>
<p dir="auto">While I understand the basic desire, I agree with Jochen that this may be less useful than you think. Unless you are developing a really basic style and are <strong><em>absolutely</em></strong> sure you will never need new keys, there is high chance you will be forced to re-import your entire database to add new keys with a "make_filter_tags_func" that excludes any key from hstore/jsonb not on your "whitelist" of desired keys.</p>
<p dir="auto">This may disrupt a potential continuous update process you have running, and may require to take your service offline if you haven't got spare hardware.</p>
<p dir="auto">In practice, with any kind of "complicated", quasi "Topographic", type of style, you will quickly discover during style development that you in fact need quite a bit more keys than initially anticipated, and that you may be adding new keys for years with the ever changing landscape of tagging and enrichment of the OSM database.</p>
<p dir="auto">With all remaining keys in hstore/jsonb however, you can quickly and dynamically adapt your style by pulling the new required OSM keys from the tag storage using SQL ("tags -> <YOUR_KEY>" for hstore, "tags ->> <YOUR_KEY>" for json).</p>

<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/issues/1586#issuecomment-986232585">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353U2ZFA5DANDTIEOIILUPNT2XANCNFSM5JJXDXRA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AA6353SHQ3JCUEMIR4ZDBPTUPNT2XA5CNFSM5JJXDXRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHLELOCI.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/issues/1586#issuecomment-986232585",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/1586#issuecomment-986232585",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>