<blockquote>
<p>Do you have a UML class diagram of tables generated by osm2pgsql?</p>
</blockquote>
<p>No, and the tables generated depend on the style file. If you <em>really</em> want a diagram, run it and put the schema through a tool.</p>
<blockquote>
<p>Perfect! Can you show an little draft with this lua script? In principle the transform can be also after usual tables build, a psql script... But a previous transform save some memory and CPU time.</p>
</blockquote>
<p><a href="https://github.com/ClearTables/ClearTables/blob/v0.0.4/util.lua#L48-L59">https://github.com/ClearTables/ClearTables/blob/v0.0.4/util.lua#L48-L59</a> is what I do with hstore, and then it gets cast with the COPY command. The same can be done with json or jsonb.</p>
<hr>
<p>After talking to others, I'm closing this.</p>
<p>The slim table schema is an internal implementation detail of osm2pgsql, so outside use is not a concern.</p>
<p>For the rendering tables, it is already possible to have a jsonb column. The submitter is using examples unrelated to the osm2pgsql. Our rendering tables don't have foreign keys, serials, unique constraints, or links between them. An example showing current tables and proposed changes would have been more convincing as it would have been relevant to osm2pgsql.</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/533#issuecomment-271695343">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AD2-7ko_zULlvy68Dx9N2wKl5TiAoIuAks5rQ_BkgaJpZM4HiUpY">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AD2-7rDmHhyXZ4lFf0zR3dvL4GXO0gSPks5rQ_BkgaJpZM4HiUpY.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/osm2pgsql/issues/533#issuecomment-271695343"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/osm2pgsql","title":"openstreetmap/osm2pgsql","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/osm2pgsql"}},"updates":{"snippets":[{"icon":"PERSON","message":"@pnorman in #533: \u003e Do you have a UML class diagram of tables generated by osm2pgsql?\r\n\r\nNo, and the tables generated depend on the style file. If you *really* want a diagram, run it and put the schema through a tool. \r\n\r\n\u003e Perfect! Can you show an little draft with this lua script? In principle the transform can be also after usual tables build, a psql script... But a previous transform save some memory and CPU time.\r\n\r\nhttps://github.com/ClearTables/ClearTables/blob/v0.0.4/util.lua#L48-L59 is what I do with hstore, and then it gets cast with the COPY command. The same can be done with json or jsonb.\r\n\r\n-----\r\n\r\nAfter talking to others, I'm closing this.\r\n\r\nThe slim table schema is an internal implementation detail of osm2pgsql, so outside use is not a concern.\r\n\r\nFor the rendering tables, it is already possible to have a jsonb column. The submitter is using examples unrelated to the osm2pgsql. Our rendering tables don't have foreign keys, serials, unique constraints, or links between them. An example showing current tables and proposed changes would have been more convincing as it would have been relevant to osm2pgsql."}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/osm2pgsql/issues/533#issuecomment-271695343"}}}</script>