Kevin:
That was the  cut and paste error:
The error is still the same:

INSERT INTO guest(ID, NAME, GEOM)
VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7
8)', -1));

ERROR:  array value must start with "{" or dimension information

********** Error **********

ERROR: array value must start with "{" or dimension information
SQL state: 22P02
Thanks

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Kevin Neufeld
Sent: March 10, 2010 12:33 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] FW: Inserting value into geometry column
error: Array value must start with "{" or dimension.

This is DDL for a table named "gtest", but you're inserting into a table
named "guest".  I suspect you're accidentally inserting into a different
table, one where the "GEOM" column is not of type "geometry".

In any case, your posted DDL is correct - so is this:
CREATE TABLE gtest (ID int4, NAME varchar(20), GEOM geometry);

Your insert statement then should work correctly:
INSERT INTO gtest(ID, NAME, GEOM)
VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7
8)', -1));

Cheers,
Kevin


On 3/10/2010 9:18 AM, Majid Kazemi wrote:
>   Here is the DDL for Table creation:
> CREATE TABLE gtest ( ID int4, NAME varchar(20) ); SELECT 
> AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2);
> Thanks, Majid
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of 
> Kevin Neufeld
> Sent: March 10, 2010 11:48 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] FW: Inserting value into geometry column
> error: Array value must start with "{" or dimension.
>
> What's the DDL for your guest table?
>
> On 3/10/2010 8:29 AM, Majid Kazemi wrote:
>> *From:* Majid Kazemi
>> *Sent:* March 10, 2010 11:02 AM
>> *To:* '[email protected]'
>> *Subject:* Inserting value into geometry column error: Array value 
>> must start with "{" or dimension.
>>
>> Hello all;
>> Thanks for everyone help. I finally managed to install and configure 
>> Postgis.
>> Now, I am trying to insert the following into a table with Geom
> column.
>>
>> INSERT INTO guest(ID, NAME, GEOM)
>>
>> VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 
>> 8)', -1));
>>
>> I am receiving the following error:
>>
>> Array value must start with "{" or dimension.
>>
>> your help will highly be appreciated.
>>
>> Thanks, Majid
>>
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> [email protected]
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to