| От | Tom Lane |
|---|---|
| Тема | Re: arrays and polygons |
| Дата | |
| Msg-id | 2252.1076684559@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | arrays and polygons ("David" <de4@kent.ac.uk>) |
| Ответы |
Re: arrays and polygons
|
| Список | pgsql-sql |
"David" <de4@kent.ac.uk> writes:
> ALTER TABLE species ADD COLUMN location polygon[];
> INSERT INTO species (location) VALUES ('{((432,89), (45,87), (89,87)),
> ((54,78), (34,98))};
I think you'd need to double-quote each polygon within the array
literal.
'{"((432,89), (45,87), (89,87))", "..."}'
The array parser doesn't think parens are special, so it's not going to
magically distinguish array commas from polygon commas for you.
BTW, if you are using 7.4, the ARRAY[] constructor syntax might be
easier to use.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера