Re: Re: [HACKERS] Counting bool flags in a complex query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Re: [HACKERS] Counting bool flags in a complex query
Date: 2000-10-06 21:23:43
Message-ID: 5079.970867423@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

"Josh Berkus" <josh(at)agliodbs(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alfred Perlstein 2000-10-06 22:59:43 Re: (forw) more crashes
Previous Message Lamar Owen 2000-10-06 18:46:15 Re: PostgreSQL backing www.royal.com

Browse pgsql-sql by date

  From Date Subject
Next Message Edipo E. F. Melo 2000-10-07 02:56:12 Re: Date problem
Previous Message Josh Berkus 2000-10-06 16:31:44 Re: Re: [HACKERS] Counting bool flags in a complex query