pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brent Wood <brent.wood@blazemail.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] polygon problem
Date: Sun, 12 Dec 1999 00:53:19 -0500
Message-ID: <25415.944977999@sss.pgh.pa.us> (raw)
In-Reply-To: <3852C2FC.BF4B14A7@blazemail.com>

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



view thread (3+ messages)

Message-ID: <25415.944977999@sss.pgh.pa.us>
Permalink:  ../25415.944977999@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25415.944977999@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, brent.wood@blazemail.com
  Subject: Re: [SQL] polygon problem
  In-Reply-To: <25415.944977999@sss.pgh.pa.us>
  References: <3852C2FC.BF4B14A7@blazemail.com> <25415.944977999@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox