Re: UNION DISTINCT in doc

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: UNION DISTINCT in doc
Date: 2010-10-15 00:53:54
Message-ID: AANLkTik=XKoPQvrQ+OJ_z9nhVj7kAXiVLYMsPcramMxz@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/10/15 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
>> UNION DISTINCT is nothing more than UNION itself, but gram.y
>> definitely accept it and the SQL standard describes it as well. Should
>> we add DISTINCT to docs?
>
> I think it'd be hard to describe without confusing people, because
> while DISTINCT is a noise word there, it's definitely not a noise
> word after SELECT.  And the way that the reference pages are laid
> out, it's hard to connect different descriptions of the same
> keyword to different usages.  If you can think of a non-forced
> way of describing this, fine.  But I don't have a problem with
> leaving it as an undocumented standards-compliance nit.

I thought adding DISTINCT next to ALL is enough like

select_statement UNION [ ALL | DISTINCT ] select_statement

and say "UNION DISTINCT is identical to UNION only" or something. That
sounds not so confusing with DISTINCT clause description.

Regards,

--
Hitoshi Harada

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-10-15 01:16:22 Re: shmget error text reports funny max_connections numbers
Previous Message Itagaki Takahiro 2010-10-15 00:52:09 Re: string function - "format" function proposal