On Fri, Aug 2, 2013 at 5:39 PM, Paragon Corporation <[email protected]> wrote:

> **
> Try using a  trigger.
> http://www.postgresql.org/docs/9.1/static/sql-createtrigger.html
>
> A foreign key won't work since it requires a btree primary key unless you
> use a btree primarky key on geometry, which at best would only work for
> points.
>

Apparently, I was unclear. I meant a foreign key to the primary key on the
other table, which I presume is not a geometry. My point was: if the
geometries are always duplicates of each other, there's no point in storing
them twice. If that's the case, pick a table, remove its geometry column,
and add a foreign key to the other table. When you need the geometry on the
table that no longer stores it, JOIN it to the other table to get the
geometry.
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to