[SQL] arrays and polygons

2004-05-31 Thread David
Hi there i am having problems inserting an array of polygons into a table, i have added the column using: ALTER TABLE species ADD COLUMN location polygon[]; this works fine, but when i try INSERT INTO species (location) VALUES ('{((432,89), (45,87), (89,87)), ((54,78), (34,98))}; I get the foll

Re: [SQL] arrays and polygons

2004-02-13 Thread Joe Conway
Tom Lane wrote: "David" <[EMAIL PROTECTED]> writes: 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

Re: [SQL] arrays and polygons

2004-02-13 Thread David
Thanks to you both that helped enormously, Dave - Original Message - From: "Joe Conway" <[EMAIL PROTECTED]> To: "Tom Lane" <[EMAIL PROTECTED]> Cc: "David" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 13, 2004

Re: [SQL] arrays and polygons

2004-02-13 Thread Tom Lane
"David" <[EMAIL PROTECTED]> 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