Lists: | pgsql-novice |
---|
From: | rezgui monia <rezgui(dot)monia(at)yahoo(dot)com> |
---|---|
To: | jill289(at)hotmail(dot)com, pgsql-novice(at)postgresql(dot)org |
Subject: | help |
Date: | 2010-10-19 09:10:46 |
Message-ID: | 175614.65375.qm@web110001.mail.gq1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Hi,
I found in forum of postgresql your discussion.
In fact, I've the same problem, when I wrote:
INSERT INTO ROADS (ROAD_ID,ROADS_GEOM,ROAD_NAME ) VALUES (1,GeomFromText('LINESTRING(191232 243118,191108 243242)',-1),'Jeff Rd');
it returns: "new row for relation 'roads' violate check constraints"
Please, if you remember any things to resolve this problem, please help me.
Monia REZGUI
From: | "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: help |
Date: | 2010-10-19 12:14:53 |
Message-ID: | 20101019141453.195cf6e7@anubis.defcon1 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
On Tue, 19 Oct 2010 02:10:46 -0700 (PDT), rezgui monia
<rezgui(dot)monia(at)yahoo(dot)com> wrote:
> INSERT INTO ROADS (ROAD_ID,ROADS_GEOM,ROAD_NAME ) VALUES
> (1,GeomFromText('LINESTRING(191232 243118,191108 243242)',-1),'Jeff Rd');
>
> it returns: "new row for relation 'roads' violate check constraints"
> Please, if you remember any things to resolve this problem, please help
> me.
May be not related, but try to never insert a primary key: as you insert
1 for road_id, the PK sequence is NOT incremented; use default instead.
--
From: | Kasia Tuszynska <ktuszynska(at)esri(dot)com> |
---|---|
To: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: help |
Date: | 2010-10-19 20:44:31 |
Message-ID: | 232B5217AD58584C87019E8933556D110219B82845@redmx2.esri.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Rezgui,
This is a postgis question, I would suggest the postgis forums.
Right off the bat the the sql does not seem to be problematic, as it is an example from the postgis help.
I would venture a guess that you have not granted privs on the public.geometry_columns table...
Good luck,
Kasia
-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org [mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Jean-Yves F. Barbier
Sent: Tuesday, October 19, 2010 5:15 AM
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] help
On Tue, 19 Oct 2010 02:10:46 -0700 (PDT), rezgui monia
<rezgui(dot)monia(at)yahoo(dot)com> wrote:
> INSERT INTO ROADS (ROAD_ID,ROADS_GEOM,ROAD_NAME ) VALUES
> (1,GeomFromText('LINESTRING(191232 243118,191108 243242)',-1),'Jeff Rd');
>
> it returns: "new row for relation 'roads' violate check constraints"
> Please, if you remember any things to resolve this problem, please help
> me.
May be not related, but try to never insert a primary key: as you insert
1 for road_id, the PK sequence is NOT incremented; use default instead.
--
--
Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice