<p><a href="https://github.com/pnorman" class="user-mention">@pnorman</a>: That's why a bounding box for relations would me more than sufficient, and it wouldn't take that long to build (and wouldn't take that much space). I was using pgsimple before and maintained my own set of functions to construct planet_osm_point/line/polygon type of tables, but it's no fun maintaining such functions. My first attempt a couple of years ago was a mixture of osm2pgsql AND pgsimple, but that was no fun either (and didn't work with db updates).</p>

<p><a href="https://github.com/cquest" class="user-mention">@cquest</a>: I'm gonna look into triggers, maybe that's an idea. Can I define the trigger before the import or would I create the trigger after import and calculate all initial data beforehand?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/openstreetmap/osm2pgsql/issues/116#issuecomment-32243913'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/4046574__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNTIxNzQ3MiwiZGF0YSI6eyJpZCI6MjMzODYxOTN9fQ==--c3a456d8489b9d588c75560748258be38e760b33.gif' height='1' width='1'></p>