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

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: 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, pgsql-sql <pgsql-sql(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: [SQL] DISTINCT ON: speak now or forever hold your peace
Date: 2000-01-26 23:16:32
Message-ID: 200001262316.SAA29624@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-sql
> Chris Bitmead <chris(at)bitmead(dot)com> writes:
> > As long as we're fixing the syntax, I'm wondering if it wouldn't be more
> > logical to have DISTINCT ON somewhere later in the syntax.
> 
> Well, SELECT DISTINCT is that way because SQL92 says so.  Putting the
> DISTINCT ON variant somewhere else might be logically purer, but I think
> it'd be confusing.
> 
> Also, isn't the reason we have DISTINCT ON at all that it's there to
> be compatible with MySQL or someone?  I figured adding parens would be
> about the least-surprising variant syntax for a person used to those
> other products.
> 

Makes sense to me.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2000-01-26 23:46:45
Subject: Re: OIDS (Re: [HACKERS] Well, then you keep your darn columns)
Previous:From: Tom LaneDate: 2000-01-26 23:05:08
Subject: Re: [HACKERS] Re: [SQL] DISTINCT ON: speak now or forever hold your peace

pgsql-sql by date

Next:From: Chris BitmeadDate: 2000-01-27 05:41:01
Subject: Ars Digita and PostgreSQL
Previous:From: Tom LaneDate: 2000-01-26 23:05:08
Subject: Re: [HACKERS] Re: [SQL] DISTINCT ON: speak now or forever hold your peace

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