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

From Tom Lane
Subject Re: [SQL] polygon problem
Date
Msg-id 25415.944977999@sss.pgh.pa.us
Whole thread Raw
In response to polygon problem  (Brent Wood <brent.wood@blazemail.com>)
List pgsql-sql
Brent Wood <brent.wood@blazemail.com> writes:
>     insert into table1 values ('poly1',((0,0),(0,1),(1,0)),'s');
> This fails with the msg:
> ERROR:   parser: parser error at or near ","

I think you need quotes around the polygon value, ie,
   insert into table1 values ('poly1','((0,0),(0,1),(1,0))','s');

As a rule of thumb, the only datatypes that don't need quotes around
literal values in SQL statements are numeric types.  Our SQL parser
doesn't understand weird datatypes like polygon --- it wants a string
literal, which it'll eventually hand off to the type-specific input
routine for the datatype.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Gene Selkov Jr."
Date:
Subject: Re: [SQL] polygon problem
Next
From: "Bruno Mendonca"
Date:
Subject: