[postgis-users] How to change the SRID of a table in geometry_columns view

Nicolas Ribot nicolas.ribot at gmail.com
Fri Sep 14 01:03:58 PDT 2012


This is now possible thanks to the typemods, by altering the column:

alter table mytable
ALTER COLUMN geom TYPE geometry(MultiPolygon,2154) USING ST_setSRID(geom, 2154);

(replacing the type by the one of the geom column)


On 14 September 2012 09:36, Stefan Schwarzer <stefan.schwarzer at unep.org> wrote:
> Hi there,
> I'd need to change the SRID of a table, as it is "0" in the moment, and should be something else. I searched around, but couldn't really find clear guidance on how to do this with Postgis 2.x, as the "geometry_columns" is now a view and not anymore a table.
> I guess there is a simple SQL for that? A UpdateGeometrySRID or so?
> Thanks for any hints,
> Stef
> _______________________________________________
> 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