X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 762C0D1B8B7 for ; Thu, 15 Apr 2004 06:31:09 -0300 (ADT) 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 41093-03 for ; Thu, 15 Apr 2004 06:31:10 -0300 (ADT) Received: from CISX-Linux4.cisx.com (unknown [213.133.202.58]) by svr1.postgresql.org (Postfix) with ESMTP id B8422D1B515 for ; Thu, 15 Apr 2004 06:31:06 -0300 (ADT) Received: from DEMOLITION ([192.168.100.22]) by CISX-Linux4.cisx.com (8.12.8/8.12.8) with SMTP id i3F988dq013081 for ; Thu, 15 Apr 2004 10:08:09 +0100 Message-ID: <001801c422cc$16d0ec40$1664a8c0@DEMOLITION> From: "Donald Fraser" To: "[ADMIN]" References: <006701c42223$2dfe5960$1664a8c0@DEMOLITION> <11791.1082002874@sss.pgh.pa.us> Subject: Re: Updgrade from 7.3 to 7.4 Date: Thu, 15 Apr 2004 10:29:00 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/227 X-Sequence-Number: 13200 ----- Original Message ----- > > "Donald Fraser" writes: > > 2) One of my queries does an ORDER BY on a column that is of type BOX. > > This query no longer runs and returns the following error message: > > ERROR: could not identify an ordering operator for type box > > What are you expecting that to do? Boxes have no natural linear > ordering. > > > my_box[0] returns a point and my_box[0][0] is not recognised (I tried various > > other forms but to no avail). > > I think (my_box[0])[0] would work to get the lower x-coordinate, if > that's what you're after. > > regards, tom lane Thanks the syntax you gave, (my_box[0])[0], is what I'm looking for. I checked on my production machine which is still running 7.3.4 and the ORDER BY for box doesn't seem to follow any pattern! Originally the data returned would probably have been in the order that it was entered which would have been correct and thus why I missed seeing that there was a problem. I had assumed ORDER BY on a box was equivalent to ORDER BY y1, x1, y2, x2 - that is if you imagine your computer screen as a co-ordinate system then a box located at the top left hand corner is ordered before a box located at the bottom right hand corner. Thinking about it a bit more its quite a silly assumption on my behalf! Anyway problem solved thanks. Donald Fraser