Skip site navigation (1) Skip section navigation (2)

Re: Updgrade from 7.3 to 7.4

From: "Donald Fraser" <demolish(at)cwgsy(dot)net>
To: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Updgrade from 7.3 to 7.4
Date: 2004-04-15 09:29:00
Message-ID: 001801c422cc$16d0ec40$1664a8c0@DEMOLITION (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
----- Original Message -----
> > "Donald Fraser" <demolish(at)cwgsy(dot)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
> > 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

In response to

pgsql-admin by date

Next:From: Paul BreenDate: 2004-04-15 12:47:38
Subject: Re: Real time replication of PG DBs accross two servers -
Previous:From: Tom LaneDate: 2004-04-15 04:21:14
Subject: Re: Updgrade from 7.3 to 7.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group