Re: [SQL] polygon problem - Mailing list pgsql-sql

From Gene Selkov Jr.
Subject Re: [SQL] polygon problem
Date
Msg-id 199912120041.SAA11940@mail.xnet.com
Whole thread Raw
In response to polygon problem  (Brent Wood <brent.wood@blazemail.com>)
List pgsql-sql
According to Brent Wood:
> 
>     insert into table1 values ('poly1',((0,0),(0,1),(1,0)),'s');
> This fails with the msg:
> ERROR:   parser: parser error at or near ","
> 
> As I read the docs on polygon types, this should work.

It shouldn't. The SQL parser can't read the VALUES() clause because
you omitted the quotes around the polygon string. It had to be:
    insert into table1 values ('poly1', '((0,0),(0,1),(1,0))', 's');

or
    insert into table1 values ('poly1', '(0,0,0,1,1,0)', 's');


--Gene


pgsql-sql by date:

Previous
From: Brent Wood
Date:
Subject: polygon problem
Next
From: Tom Lane
Date:
Subject: Re: [SQL] polygon problem