Re: Multi-column distinctness.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Multi-column distinctness.
Date: 2015-10-20 18:50:51
Message-ID: 19013.1445367051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> writes:
> On 10/20/2015 05:59 PM, Tom Lane wrote:
>> Why is this an improvement over using already-existing keywords?

> The problem is that the actual syntax is ADD [COLUMN], so we can't
> simply use ADD STATISTICS as that would mean a conflict in the grammar.
> Resolving it means either making COLUMN non-optional, or adding
> STATISTICS to reserved keywords - both options break existing code.

I'm unconvinced that it cannot be made to work. The proposal was
something like
ALTER TABLE t ADD STATISTICS ON column-names ...
no? ON is already fully reserved, which means that this is not ambiguous.
Or if you would rather not use ON, another way of making it not ambiguous
would be to put the column-names list in parentheses.

It's entirely possible that some refactoring of the grammar would
be needed to make it work, of course.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-10-20 18:55:46 Re: pgbench throttling latency limit
Previous Message Tomas Vondra 2015-10-20 18:22:14 Re: Multi-column distinctness.