From: Don Baccus <dhogaza@pacifier.com>
To: Philip Warner <pjw@rhyme.com.au>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Chris Bitmead <chris@bitmead.com>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
Date: Tue, 25 Jan 2000 07:41:38 -0800
Message-ID: <3.0.1.32.20000125074138.00f752c0@mail.pacifier.com> (raw)
In-Reply-To: <3.0.5.32.20000125170026.0357d8f0@mail.rhyme.com.au>
References: <3.0.1.32.20000124212022.00f70720@mail.pacifier.com>
<11879.948776470@sss.pgh.pa.us>
<3.0.5.32.20000125150557.036121c0@mail.rhyme.com.au>
<2295.948765015@sss.pgh.pa.us>
<3.0.5.32.20000125140349.035768d0@mail.rhyme.com.au>
<3.0.5.32.20000125150557.036121c0@mail.rhyme.com.au>
At 05:00 PM 1/25/00 +1100, Philip Warner wrote:
>Out of curiosity, does the SQL spec give any rules or guidelines about when
>aggregates should be applied to resultant rows? Or is it one of the
>implementation-dependant things?
Well...my copy of Date's now actually in the mail, rather than in
Boston, but at the moment that's not much help!
"order by" happens after everything, AFAIK. For instance...
select ...
union
select ...
order by
orders the result of the union, which pretty much implies that
aggregates will happen first.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
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: dhogaza@pacifier.com, pjw@rhyme.com.au, tgl@sss.pgh.pa.us, chris@bitmead.com, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
In-Reply-To: <3.0.1.32.20000125074138.00f752c0@mail.pacifier.com>
References: <3.0.1.32.20000124212022.00f70720@mail.pacifier.com> <11879.948776470@sss.pgh.pa.us> <3.0.5.32.20000125150557.036121c0@mail.rhyme.com.au> <2295.948765015@sss.pgh.pa.us> <3.0.5.32.20000125140349.035768d0@mail.rhyme.com.au> <3.0.1.32.20000125074138.00f752c0@mail.pacifier.com>
* 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