Opened 12 years ago
Closed 11 years ago
#739 closed enhancement (fixed)
|Reported by:||etiennebr||Owned by:||Bborie Park|
Maybe it would be more elegant to have a UpdateRasterSRID or a ST_SetSRID(raster) than use the following
alter table <raster> drop constraint enforce_srid_rast; update <raster> set rast = st_setsrid(rast, <srid>); alter table <raster> add constraint enforce_srid_rast CHECK (st_srid(rast) = <srid>);
Change History (9)
comment:1 by , 12 years ago
|Component:||postgis → postgis raster|
|Milestone:||PostGIS 1.5.3 → PostGIS 2.0.0|
|Summary:||UpdateRasterSRID → [raster] UpdateRasterSRID|
|Version:||1.5.X → trunk|
comment:2 by , 12 years ago
|Milestone:||PostGIS 2.0.0 → PostGIS Raster Future|
comment:3 by , 11 years ago
|Milestone:||PostGIS Raster Future → PostGIS Future|
comment:4 by , 11 years ago
comment:5 by , 11 years ago
Isn't calling AddRasterConstraints() also require DDL privileges? Most management function do so no? UpdateRasterSRID would just be one management function among others.
Otherwise, it should not be specific to raster but also take the parameters of a geometry table.
boolean UpdateSRID(name schema, name table, name rastorgeometrycolumn)
comment:6 by , 11 years ago
This seems reasonable to me. Much shorter than remembering the ALTER TABLE .. and ..
comment:7 by , 11 years ago
geometry already has such a function:
I think it's best not to try to create a generic one UpdateSRID since for geometry the default is typmod and trying to make it an IF geometry then else use constraints will make it complicated.
comment:8 by , 11 years ago
|Status:||new → assigned|
Thanks robe. That's what I was wondering.
comment:9 by , 11 years ago
|Milestone:||PostGIS Future → PostGIS 2.1.0|
|Status:||assigned → closed|
Added in r10581
This seems inappropriate. ALTER and DROP would require DDL privileges. ST_SetSRID(raster) already exists.