Re: Multi-column distinctness.

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Multi-column distinctness.
Date: 2015-09-11 16:58:20
Message-ID: 55F3082C.8050009@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 09/07/2015 05:25 AM, Kyotaro HORIGUCHI wrote:
> Hello,
>
>> but making the COLUMN
>> required is certainly much worse as it breaks many existing scripts. The
>> keyword inky breaks cases that manipulate "statistics" column.
>
> Ouch! It is simply by accident, or my lack of carefulness. I will
> come up with fixed syntax later..
>
>> If any of this is unacceptable, then we probably need to come up with a
>> different syntax.

I've been thinking about the syntax, and I think both options (making
COLUMN required or making STATISTICS a reserved keyword) will break
something no matter what we do, forcing the users to either always use
ADD COLUMN or quote all the existing uses of "statistics" (as column
names, for example).

Maybe the best solution is to abandon the ALTER TABLE approach entirely,
and instead invent a new set of commands

CREATE STATISTICS
DROP STATISTICS

(ALTER STATISTICS seems a bit excessive at this point).

Another thing is that perhaps we should add names for statistics, just
like we do for constraints, for example. Otherwise the DROP STATISTICS
handling is rather awkward - for example if the user creates stats twice
by mistake, he's unable to drop just one of them.

regards

--
Tomas Vondra http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2015-09-11 17:12:32 Re: DBT-3 with SF=20 got failed
Previous Message Tom Lane 2015-09-11 16:56:36 Re: RLS open items are vague and unactionable