Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbnlV-0001Am-2I for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Sep 2015 10:47:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZbnlU-0003Vy-JD for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Sep 2015 10:47:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZbnkB-00023R-M3 for pgsql-hackers@postgresql.org; Tue, 15 Sep 2015 10:45:47 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Zbnk8-0000Z5-Qa for pgsql-hackers@postgresql.org; Tue, 15 Sep 2015 10:45:46 +0000 Received: from [192.168.27.79] (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id 9EFB521C33FD for ; Tue, 15 Sep 2015 13:45:43 +0300 (MSK) Subject: Re: [PROPOSAL] Covering + unique indexes. To: pgsql-hackers@postgresql.org References: <55F2C1BC.3010109@postgrespro.ru> <55F2CCD0.7040608@postgrespro.ru> <55F6F7AD.4080307@BlueTreble.com> <55F70D0A.2030503@sigaev.ru> <55F73FDA.2030001@BlueTreble.com> <55F7B7C9.6090109@sigaev.ru> <55F7E0AB.3020600@2ndquadrant.fr> From: Anastasia Lubennikova Message-ID: <55F7F6D7.1060800@postgrespro.ru> Date: Tue, 15 Sep 2015 13:45:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F7E0AB.3020600@2ndquadrant.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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. 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? -- Anastasia Lubennikova Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers