Re: [postgis-users] check constraints violated - ¿how to fix this?

Markus Schaber schabi at logix-tt.com
Tue Oct 25 09:56:22 PDT 2005


Hi, Guido,

Guido Lemoine wrote:
> Your problem is that you define your geometry column with SRID = -1.
> This becomes the enforce_srid_spos constraint on your table. Then, you
> try to insert with SRID=4326, which fails the constaint check.
> 
> So, simple make it
> 
> SELECT AddGeometryColumn(
>            'gs_inf', 'spos', 4326, 'POINT',
>            2);
> 
> and your prob should be solved.

And if he really wants to have a mixed SRID column, he can drop the
constraint (and OpenGIS conformity) with the ALTER TABLE command.

Markus



More information about the postgis-users mailing list