Re: [SQL] polygon problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brent Wood <brent(dot)wood(at)blazemail(dot)com>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] polygon problem
Date: 1999-12-12 05:53:19
Message-ID: 25415.944977999@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Brent Wood <brent(dot)wood(at)blazemail(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Mendonca 1999-12-12 20:13:53
Previous Message Gene Selkov Jr. 1999-12-12 01:43:26 Re: [SQL] polygon problem