<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Hey,<br></div><div class="gmail_default" style="font-family:monospace,monospace">I asked this question to the postgres mailing list here:<br><a href="http://www.postgresql.org/message-id/CAJvUf_szgMLxC4=b6+AgY9HgyPaRes2JVb6bTKXiFF6CXa_epw@mail.gmail.com">http://www.postgresql.org/message-id/CAJvUf_szgMLxC4=b6+AgY9HgyPaRes2JVb6bTKXiFF6CXa_epw@mail.gmail.com</a><br><br></div><div class="gmail_default" style="font-family:monospace,monospace">I would be very interested if you find a solution (I did not).<br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Cheers,<br></div><div class="gmail_default" style="font-family:monospace,monospace">Rémi-C<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-02 21:04 GMT+02:00 Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I know I can setup table inheritance and constraint exclusion based on say the state field. But I would like to do this based on geom and the table extents. How would I do this?<br>
<br>
Say for example, I create a roads table, then load data into roads_area1, roads_area2, etc and these inherit from roads.<br>
<br>
For the state abbrv. I might have:<br>
<br>
ALTER TABLE roads_area1 ADD CONSTRAINT chk<br>
   CHECK (state IN ('MA', 'ME', 'NH'));<br>
<br>
So doing the same based on geom column might look like:<br>
<br>
ALTER TABLE roads_area1 ADD CONSTRAINT bbox_chk<br>
CHECK (geom && <????>);<br>
<br>
So does this work?<br>
<br>
Do I need to do anything special to get postgresql to using constraint exclusion? What?<br>
<br>
How would I set <????>?<br>
<br>
These tables are create once and query often, so the extents are not changing after they are loaded.<br>
<br>
Thanks,<br>
  -Steve W<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br></div>