X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id C5006D1B8B3 for ; Thu, 28 Aug 2003 16:55:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 48119-10 for ; Thu, 28 Aug 2003 13:55:10 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 610A3D1B8AD for ; Thu, 28 Aug 2003 13:55:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7SGt75H028050; Thu, 28 Aug 2003 12:55:07 -0400 (EDT) To: "Donald Fraser" Cc: "[ADMIN]" Subject: Re: Extracting single coordinate from a box In-reply-to: <00f001c36d83$11ee0220$1664a8c0@DEMOLITION> References: <00f001c36d83$11ee0220$1664a8c0@DEMOLITION> Comments: In-reply-to "Donald Fraser" message dated "Thu, 28 Aug 2003 17:40:15 +0100" Date: Thu, 28 Aug 2003 12:55:06 -0400 Message-ID: <28049.1062089706@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/340 X-Sequence-Number: 10060 "Donald Fraser" writes: > But when I try something like b[0][0] the passer ignores the second array > subscript parameter and returns only a "point". Try this: regression=# select f1, (f1[1])[0] from box_tbl; f1 | f1 ---------------------+----- (2,2),(0,0) | 0 (3,3),(1,1) | 1 (2.5,3.5),(2.5,2.5) | 2.5 (3,3),(3,3) | 3 (4 rows) You need the extra parentheses because the two subscript operations need to work on fundamentally different datatypes --- if you write f1[1][0] you are asking to subscript a 2-D array which this isn't. [ experiments further ... ] Drat, seems that syntax works in 7.4 but not 7.3. Dunno if that will help you. regards, tom lane