| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера