[postgis-users] Adding SRID after the fact

strk at refractions.net strk at refractions.net
Tue Dec 14 11:10:30 PST 2004

On Tue, Dec 14, 2004 at 12:35:41PM -0600, David Bitner wrote:
> Is it possible to add an SRID to a PostGIS table after the fact.  I
> have a table that I brought in with an SRID of -1 because at the time
> I didn't know it's SRID, but now I want to define it as 26915.
> An update using SETSRID() results in a check constraints error.
> Thanks

This is a pretty common issue, probably deserving a specific

You have to drop the constraint, setsrid(), put the constraint
back and modify geometry_columns.

What people thing about a
SELECT UpdateGeometrySrid([<schema>],<table>,<field>,<newsrid>);
function ?


> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

More information about the postgis-users mailing list