[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: [postgis-users] check constraints violated -
From: ricardd () mathstat ! dal ! ca
Date: 2005-10-25 13:28:02
Message-ID: 61102.142.176.61.245.1130246882.squirrel () 142 ! 176 ! 61 ! 245
[Download RAW message or body]
Hello postgis-users,
Just a clarification about check constraints.
I'm running postgis 1.0.3 with postgreSQL 8.0.3 on Linux. The
spatial_ref_sys table was populated at installation with ESPG data using
spatial_ref_sys.sql
My data is from fisheries surveys and some records only have a starting
position and no ending position. The spatial objects are defined as
follows:
SELECT AddGeometryColumn(
'gs_inf', 'spos', -1, 'POINT',
2);
SELECT AddGeometryColumn(
'gs_inf', 'epos', -1, 'POINT',
2);
I thought that I could use something like this to input data with missing
end position:
INSERT INTO gs_inf VALUES (GeomFromText('POINT(-66.7 44.8)',4326), NULL );
However, I get the following error message:
psql:gs_inf.sql.in:2: ERROR: new row for relation "gs_inf" violates check
constraint "enforce_srid_spos"
Any suggestions how I can solve this? Setting the srid to -1 solves the
problem but I'm curious if there is another way.
Cheers,
Dan
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic