Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace - Mailing list pgsql-hackers

From Don Baccus
Subject Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
Date
Msg-id 3.0.1.32.20000125074138.00f752c0@mail.pacifier.com
Whole thread Raw
In response to Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
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
Serviceand other goodies at http://donb.photo.net.
 


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] Sure enough, SI buffer overrun is broken
Next
From: Don Baccus
Date:
Subject: Re: [HACKERS] Happy column dropping