[postgis-users] Mulitple Geometry Columns in One Table
Steffen Macke
sdteffen at web.de
Tue Aug 17 23:31:47 PDT 2004
Hello All,
previously (up to PostGIS 0.8.0), it was possible to have
more than one geometry column in a table. With the current CVS
version this is impossible (postgis.sql.in version 1.74).
AddGeometryColumn() fails reporting an error that the constraint
"enforce_srid"
already exists.
After commenting out the following 4 lines in AddGeometryColumn(),
adding a second geometry column works again:
EXECUTE 'ALTER TABLE ' ||
quote_ident(real_schema) || '.' || quote_ident(table_name)
|| ' ADD CONSTRAINT enforce_srid CHECK (SRID(' ||
quote_ident(column_name) ||
') = ' || new_srid || ')' ;
Is it possible to check for existence of the constraint before? Or does
it make more sense
to include the geometry column name in the constraint name (e.g.
enforce_shape_srid)?
Regards,
Steffen
More information about the postgis-users
mailing list