Re: Multi-column distinctness.

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Multi-column distinctness.
Date: 2015-09-06 10:04:25
Message-ID: CAF+b1QQn8JGCPD9Ysj9SRRiTm0aWexyO4bWQhZdfTCHp8Wdnfg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sep 6, 2015 10:31, "Tomas Vondra" <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
>
> 5) syntax
> ---------
> The syntax might be one of the pain points if we eventually decide to
commit the multivariate stats patch. I have no intention in blocking this
patch for that reasons, but if we might design the syntax to make it
compatible with the multivariate patch, that'd be nice. But it seems to me
the syntax is pretty much the same, no?
>
> I.e. it uses
>
> ADD STATISTICS (options) ON (columns)
>
> just like the multivariate patch, no? Well, it doesn't really check the
stattypes in ATExecAddDropMvStatistics except for checking there's a single
entry, but the syntax seems OK.
>
> BTW mixing ADD and DROP in ATExecAddDropMvStatistics seems a bit
confusing. Maybe two separate methods would be better?
>

BTW one more comment about the syntax - you ran into the same conflict
between "ADD [COLUMN] column" and "ADD STATISTICS" like I did, but you
solved it by making the COLUMN required while I made STATISTICS keyword.

I'm not enthusiastic about the keyword thing, but making the COLUMN
required is certainly much worse as it breaks many existing scripts. The
keyword inky breaks cases that manipulate "statistics" column.

If any of this is unacceptable, then we probably need to come up with a
different syntax.

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 Pavel Stehule 2015-09-06 10:09:28 Re: [PATCH] SQL function to report log message
Previous Message Pavel Stehule 2015-09-06 09:54:08 Re: [PATCH] SQL function to report log message