Re: Multi-column distinctness. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Multi-column distinctness.
Date
Msg-id 19013.1445367051@sss.pgh.pa.us
Whole thread Raw
In response to Re: Multi-column distinctness.  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Multi-column distinctness.
List pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Multi-column distinctness.
Next
From: Andres Freund
Date:
Subject: Re: pgbench throttling latency limit