From: Vik Fearing <vik@2ndquadrant.fr>
To: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
To: pgsql-hackers@postgresql.org
Subject: Re: [PROPOSAL] Covering + unique indexes.
Date: Tue, 15 Sep 2015 13:24:47 +0200
Message-ID: <55F7FFFF.6010904@2ndquadrant.fr> (raw)
In-Reply-To: <55F7F6D7.1060800@postgrespro.ru>
References: <55F2C1BC.3010109@postgrespro.ru>
<55F2CCD0.7040608@postgrespro.ru>
<55F6F7AD.4080307@BlueTreble.com>
<55F70D0A.2030503@sigaev.ru>
<CAEepm=2G4jdaoXHU0PJ7MqLms88==r44z9bvLpnzjyOTDzwAEw@mail.gmail.com>
<55F73FDA.2030001@BlueTreble.com>
<55F7B7C9.6090109@sigaev.ru>
<CAKJS1f-3op5KuH5PZcz3Whf1HSdOv8Jp6mpUSBA0J_fk8cHNQA@mail.gmail.com>
<55F7E0AB.3020600@2ndquadrant.fr>
<55F7F6D7.1060800@postgrespro.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 09/15/2015 12:45 PM, Anastasia Lubennikova wrote:
> 15.09.2015 12:11, Vik Fearing:
>> On 09/15/2015 10:57 AM, David Rowley wrote:
>>>> I agree, that form
>>>>> CREATE UNIQUE INDEX i ON t (f1, f2, f3) INCLUDE (f4)
>>>>> is clear. f4 will be used in row compare and actually planner will
>>>>> be able
>>>>> to use it as unique index (f1, f2, f3) with additional f4 or as
>>>>> as unique index (f1, f2, f3, f4), because uniqueness on (f1, f2,
>>>>> f3) gives
>>>>> warranty of uniqueness on (f1, f2, f3, f4)
>>>>>
>>>>>
>>> I'd vote for this too. However, INCLUDE does not seem to be a
>>> reserved word
>>> at the moment.
>> What about CREATE UNIQUE INDEX i ON t (f1, f2, f3) WITH (f4); ?
>
> WITH seems ambiguity to me. It refers to CTE, so I expect to see after
> that a kind of query expression. But maybe that's just matter of habit.
Not necessarily. See WITH ORDINALITY, for example. However, now that
I've looked at it, index creation already takes a WITH clause for
storage parameters, so that's out.
> BTW, that's the first syntax change I'm working with.
> Is there any convention in PostgreSQL about new keywords and so on?
> Where can I find it?
I don't think it's written anywhere except peppered throughout the
archives. New keywords are greatly frowned upon.
INCLUDING is already an unreserved keyword, and sounds more natural than
INCLUDE anyway. Maybe that could work?
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: vik@2ndquadrant.fr, a.lubennikova@postgrespro.ru
Subject: Re: [PROPOSAL] Covering + unique indexes.
In-Reply-To: <55F7FFFF.6010904@2ndquadrant.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox