Hey, I asked this question to the postgres mailing list here: http://www.postgresql.org/message-id/CAJvUf_szgMLxC4=b6+agy9hgypares2jvb6btkxiff6cxa_...@mail.gmail.com
I would be very interested if you find a solution (I did not). Cheers, Rémi-C 2015-08-02 21:04 GMT+02:00 Stephen Woodbridge <wood...@swoodbridge.com>: > Hi, > > 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? > > Say for example, I create a roads table, then load data into roads_area1, > roads_area2, etc and these inherit from roads. > > For the state abbrv. I might have: > > ALTER TABLE roads_area1 ADD CONSTRAINT chk > CHECK (state IN ('MA', 'ME', 'NH')); > > So doing the same based on geom column might look like: > > ALTER TABLE roads_area1 ADD CONSTRAINT bbox_chk > CHECK (geom && <????>); > > So does this work? > > Do I need to do anything special to get postgresql to using constraint > exclusion? What? > > How would I set <????>? > > These tables are create once and query often, so the extents are not > changing after they are loaded. > > Thanks, > -Steve W > _______________________________________________ > postgis-users mailing list > postgis-users@lists.osgeo.org > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users