pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: [HACKERS] Counting bool flags in a complex query
Date: Fri, 06 Oct 2000 17:23:43 -0400
Message-ID: <5079.970867423@sss.pgh.pa.us> (raw)
In-Reply-To: <web-1097222@davinci.ethosmedia.com>
References: <web-1097222@davinci.ethosmedia.com>

"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



view thread (12+ messages)

Message-ID: <5079.970867423@sss.pgh.pa.us>
Permalink:  ../5079.970867423@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5079.970867423@sss.pgh.pa.us

 · 

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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com
  Subject: Re: [HACKERS] Counting bool flags in a complex query
  In-Reply-To: <5079.970867423@sss.pgh.pa.us>
  References: <web-1097222@davinci.ethosmedia.com> <5079.970867423@sss.pgh.pa.us>

* 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