Re: Re: [HACKERS] Counting bool flags in a complex query - Mailing list pgsql-sql

From Tom Lane
Subject Re: Re: [HACKERS] Counting bool flags in a complex query
Date
Msg-id 5079.970867423@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [HACKERS] Counting bool flags in a complex query  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
>> Just FYI, I have committed code for 7.1 that allows ORDER BY to work
>> correctly for a UNION'd query.  A limitation is that you can only do
>> ordering on columns that are outputs of the UNION:

> As far as I know, that limitation is standard to all SQL
> that supports UNION; the relational calculus (I'm told) is
> impossible otherwise.  

It's not very reasonable to imagine ordering on arbitrary expressions;
how would you interpret the expression in each sub-SELECT?  But it's
reasonable to imagine ordering on expressions that use only the
output columns of the UNION-type query:
SELECT q1, q2 FROM tbl1 UNION SELECT ...    ORDER BY q1+q2;

However, I didn't try to implement this yet.

> So ... we keep hearing about all the fantastic fixes in 7.1.
> When will a stable build show up? :-)

How stable is stable?  I'd say it's plenty stable enough for beta
testing now, even though we're not putting out formal beta releases
quite yet.  You could grab a nightly snapshot off the FTP server
if you want to try it.  (Beware that you will most likely have to
do another initdb before beta, so loading lots and lots of data
into a snapshot installation is probably a waste of time.)
        regards, tom lane


pgsql-sql by date:

Previous
From: Craig May
Date:
Subject: Windows 9X
Next
From: "Edipo E. F. Melo"
Date:
Subject: Re: Date problem