pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Donald Fraser <demolish@cwgsy.net>
To: [ADMIN] <pgsql-admin@postgresql.org>
Subject: Re: Updgrade from 7.3 to 7.4
Date: Thu, 15 Apr 2004 10:29:00 +0100
Message-ID: <001801c422cc$16d0ec40$1664a8c0@DEMOLITION> (raw)
References: <006701c42223$2dfe5960$1664a8c0@DEMOLITION>
	<11791.1082002874@sss.pgh.pa.us>


----- Original Message -----
> > "Donald Fraser" <demolish@cwgsy.net> 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




view thread (3+ messages)

Message-ID: <001801c422cc$16d0ec40$1664a8c0@DEMOLITION>
Permalink:  ../001801c422cc$16d0ec40$1664a8c0@DEMOLITION/
Also on:    postgresql.org/message-id/001801c422cc$16d0ec40$1664a8c0@DEMOLITION

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: demolish@cwgsy.net
  Subject: Re: Updgrade from 7.3 to 7.4
  In-Reply-To: <001801c422cc$16d0ec40$1664a8c0@DEMOLITION>
  References: <006701c42223$2dfe5960$1664a8c0@DEMOLITION> <11791.1082002874@sss.pgh.pa.us> <001801c422cc$16d0ec40$1664a8c0@DEMOLITION>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox