X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 78A9AD1B8CE for ; Fri, 13 Feb 2004 15:02:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 10484-06 for ; Fri, 13 Feb 2004 11:02:42 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id D07CED1B4B5 for ; Fri, 13 Feb 2004 11:02:37 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1DF2dxB002253; Fri, 13 Feb 2004 10:02:40 -0500 (EST) To: "David" Cc: pgsql-sql@postgresql.org Subject: Re: arrays and polygons In-reply-to: <001e01c3f21b$a8c0eb00$2d650c81@ad.kent.ac.uk> References: <001e01c3f21b$a8c0eb00$2d650c81@ad.kent.ac.uk> Comments: In-reply-to "David" message dated "Fri, 13 Feb 2004 10:25:10 +0000" Date: Fri, 13 Feb 2004 10:02:39 -0500 Message-ID: <2252.1076684559@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/146 X-Sequence-Number: 16837 "David" 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