[postgis-devel] Valid SRIDs

Stephen Frost sfrost at snowman.net
Thu Jun 26 08:14:09 PDT 2008


Tom,

* Tom Lane (tgl at sss.pgh.pa.us) wrote:
> I think only a foreign key constraint would currently be guaranteed
> to work properly.

If the geometry columns are using user-defined typmod's, as we've
discussed, and those are done in a pg_dump as 'create table ...' or even
'alter table ... add column ...' statements, I don't see how even
creating a foreign key would help.  The FK could work for
geometry_columns to spatial_ref_sys today, but with user-defined typmods
geometry_columns (hopefully) becomes just a view off of the system
catalogs.

I just don't see any way that during a restore we could ensure that
things work in a situation where the user-defined typmod functions are
checking the spatial_ref_sys table to ensure the srid being added is
valid.  The only thing I'm coming up with would involve another GUC
which would have to be set at the start of the dump as, basically,
"don't check the srid", with it defaulting to "check" for normal
operations.  I'm not sure there's even a way for an add-on module like
PostGIS to add a GUC though, and I don't see enough justification to
even try to have a 'generic'/module-agnostic GUC added to core to
support this.

	Thanks,

		Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20080626/83c50eeb/attachment.sig>


More information about the postgis-devel mailing list