Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozzsy-000722-Jr for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 12:38:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ozzsx-0004Fd-6w for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 12:38:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozzsw-0004FU-UJ for pgsql-hackers@lists.postgresql.org; Tue, 29 Nov 2022 12:38:50 +0000 Received: from tzirechnoy.static.corbina.ru ([78.107.237.199] helo=mail.mednm.com) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ozzsq-0000x8-K6 for pgsql-hackers@lists.postgresql.org; Tue, 29 Nov 2022 12:38:50 +0000 Received: from mail.tzirechnoy.ru (unknown [85.143.106.93]) by mail.mednm.com (Postfix) with ESMTPSA id A4AC210405B5 for ; Tue, 29 Nov 2022 15:38:42 +0300 (MSK) Received: by mail.tzirechnoy.ru (Postfix, from userid 1000) id CCB02A42D6; Tue, 29 Nov 2022 15:38:41 +0300 (MSK) Date: Tue, 29 Nov 2022 15:38:41 +0300 From: Ilya Anfimov To: pgsql-hackers@lists.postgresql.org Subject: Re: Patch: Global Unique Index Message-ID: Mail-Followup-To: Ilya Anfimov , pgsql-hackers@lists.postgresql.org References: <184879c5306.12490ea581628934.7312528450011769010@highgo.ca> <3866851668762233@ja6lqgzbqb6tniny.sas.yp-c.yandex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3866851668762233@ja6lqgzbqb6tniny.sas.yp-c.yandex.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Nov 18, 2022 at 12:03:53PM +0300, Sergei Kornilov wrote: > Hello > Do we need new syntax actually? I think that a global unique index can be created automatically instead of raising an error "unique constraint on partitioned table must include all partitioning columns" I may suggest even more of the new syntax. If someone has to implement sequential index checking on unique constraints, then it would be useful to be able to do that inde- pendent of partitioning also. E.g. for some kinds of manual partitions or for strangely de- signed datasets. Or for some of the table partitions instead for all of them. For that reason, perhaps some other type of unique index -- that is not an index per se, but a check against a set of indexes -- could be added. Or, perhaps, not an index, but an EXCLUDE con- straint of that kind.