[postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension.

Kevin Neufeld kneufeld at refractions.net
Wed Mar 10 09:33:22 PST 2010


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: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] 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:* 'postgis-users-bounces at postgis.refractions.net'
>> *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
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list