Opened 17 years ago
Last modified 16 years ago
#33 closed defect (fixed)
AddGeometryColumns function does not check if SRID is valid
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | postgis | Version: | |
Keywords: | Cc: |
Description
What steps will reproduce the problem?
- create table sde.road_pg (ID integer, name varchar(32));
- SELECT AddGeometryColumn( 'gis', 'road_pg','roads_geom', 3300, 'GEOMETRY
', 2 );
What is the expected output? What do you see instead? an error message, as the value of 3300, is not a valid SRID value, the spatial_reference table only goes as far as 32766. Creating a spatial column and referencing a non existant SRID should not allow for a record to be inserted into the geometry_columns table.
What version of the product are you using? On what operating system? PostGIS 1.3.2, on windows 2003 server
Please provide any additional information below.
Change History (3)
comment:1 by , 16 years ago
comment:3 by , 16 years ago
An escaped quote in the 1.3 branch was causing regression failure when loading lwpostgis.sql.
psql:lwpostgis.sql:2923: ERROR: syntax error at or near 'AddGeometryColumns' LINE 91: RAISE EXCEPTION 'AddGeometryColumns() - invalid SRID';
The same issue was not found in trunk.
Fix committed at r3057.
This issue is currently being discussed on postgis-devel