Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Chris Bitmead <chris(at)bitmead(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
Date: 2000-01-25 15:41:38
Message-ID: 3.0.1.32.20000125074138.00f752c0@mail.pacifier.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-sql
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(at)pacifier(dot)com>
  Nature photos, on-line guides, Pacific Northwest
  Rare Bird Alert Service and other goodies at
  http://donb.photo.net.

In response to

pgsql-hackers by date

Next:From: Don BaccusDate: 2000-01-25 15:53:53
Subject: Re: [HACKERS] Happy column dropping
Previous:From: Hiroshi InoueDate: 2000-01-25 15:40:00
Subject: RE: [HACKERS] Sure enough, SI buffer overrun is broken

pgsql-sql by date

Next:From: Palle GirgensohnDate: 2000-01-25 16:03:05
Subject: Re: [SQL] Duplicate tuples with unique index
Previous:From: Julian ScarfeDate: 2000-01-25 13:23:58
Subject: Re: [SQL] DISTINCT ON: speak now or forever hold your peace

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group