pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org, Teodor Sigaev <teodor@sigaev.ru>
Subject: Re: unique, partitioned index fails to distinguish index key from INCLUDEd columns
Date: Mon, 14 Jan 2019 19:31:07 -0300
Message-ID: <201901142231.tbnjmhllnptv@alvherre.pgsql> (raw)
In-Reply-To: <20190109065109.GA4285@telsasoft.com>

On 2019-Jan-09, Justin Pryzby wrote:

> -- Fails to error
> postgres=# CREATE UNIQUE INDEX ON t(j) INCLUDE(i);
> 
> -- Fail to enforce uniqueness across partitions due to failure to enforce inclusion of partition key in index KEY
> postgres=# INSERT INTO t VALUES(1,1);
> postgres=# INSERT INTO t VALUES(2,1); 

Doh.  Fix pushed.  Commit 8224de4f42cc should have changed one
appearance of ii_NumIndexAttrs to ii_NumIndexKeyAttrs, but because of
the nature of concurrent development, nobody noticed.

Thanks for reporting.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (4+ messages)  latest in thread

Message-ID: <201901142231.tbnjmhllnptv@alvherre.pgsql>
Permalink:  ../201901142231.tbnjmhllnptv@alvherre.pgsql/
Also on:    postgresql.org/message-id/201901142231.tbnjmhllnptv@alvherre.pgsql

 · 

reply

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: alvherre@2ndquadrant.com, pryzby@telsasoft.com, teodor@sigaev.ru
  Subject: Re: unique, partitioned index fails to distinguish index key from INCLUDEd columns
  In-Reply-To: <201901142231.tbnjmhllnptv@alvherre.pgsql>

* 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