[postgis-users] Difference on check constraints on colum type between Pgis 1.5 and 2.0 ?
David PEYRIERES
david.peyrieres at meteo.fr
Wed Nov 20 06:26:44 PST 2013
Hye.
I have a question about the check constraints on the PostGIS columns type
Can you explain me why we got check constraints on old version (here 1.5.2) of PostGIS and now we don't see such constraints with 2.0 when we ask a describe of such relation.
I precise that the 2 objects have been created with same query (same function) on two servers.
>>> select AddGeometryColumn('d1','contour',4326,'MULTIPOLYGON',2);
POSTGIS 1.5
___________________
bd=> \d d1
Column | Type | Modifiers
----------+----------+-----------
idmenage | integer | not null
contour | geometry |
Indexes:
"idx1_d1" btree (idmenage), tablespace "bde_data"
Check constraints:
"enforce_dims_contour" CHECK (st_ndims(contour) = 2)
"enforce_geotype_contour" CHECK (geometrytype(contour) = 'MULTIPOLYGON'::text OR contour IS NULL)
"enforce_srid_contour" CHECK (st_srid(contour) = 4326)
POSTGIS 2.0
___________________
bde=> \d d1
Column | Type | Modifiers
----------+-----------------------------+-----------
idmenage | integer | not null
contour | geometry(MultiPolygon,4326) |
Indexes:
"idx1_d1" btree (idmenage)
The difference is that the type added by function is not really the same.
Are constraints not visible but internal ?
Thanks.
David PEYRIERES
Direction des Sytèmes d'Information
Division Etudes et Développements
Administration et Support Bases de Données
Tel : +33 (0)5.61.07.83.36
Fax : +33 (0)5.61.07.81.09
david.peyrieres at meteo.fr
METEO FRANCE
www.meteo.fr
42 avenue Gustave Coriolis
31057 TOULOUSE Cédex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20131120/1bf03280/attachment.html>
More information about the postgis-users
mailing list