Re: [SQL] polygon problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] polygon problem
Дата
Msg-id 25415.944977999@sss.pgh.pa.us
обсуждение исходный текст
Ответ на polygon problem  (Brent Wood <brent.wood@blazemail.com>)
Список 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 по дате отправления:

Предыдущее
От: "Gene Selkov Jr."
Дата:
Сообщение: Re: [SQL] polygon problem
Следующее
От: "Bruno Mendonca"
Дата:
Сообщение: