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 1nQClu-0002NT-1I for pgsql-sql@arkaria.postgresql.org; Fri, 04 Mar 2022 18:35:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nQCls-0002hi-KQ for pgsql-sql@arkaria.postgresql.org; Fri, 04 Mar 2022 18:35:20 +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 1nQCio-0005XT-KD for pgsql-sql@lists.postgresql.org; Fri, 04 Mar 2022 18:32:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQCim-0003BF-6r for pgsql-sql@lists.postgresql.org; Fri, 04 Mar 2022 18:32:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 224IW5Ws3966275; Fri, 4 Mar 2022 13:32:05 -0500 From: Tom Lane To: Alexey M Boltenkov cc: "Voillequin, Jean-Marc" , "David G. Johnston" , "pgsql-sql@lists.postgresql.org" Subject: Re: unique index with several columns In-reply-to: <6699c0e9-e358-1fc2-7ce4-7a24d4bc419e@yandex.ru> References: <6699c0e9-e358-1fc2-7ce4-7a24d4bc419e@yandex.ru> Comments: In-reply-to Alexey M Boltenkov message dated "Fri, 04 Mar 2022 21:26:03 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3966273.1646418725.1@sss.pgh.pa.us> Date: Fri, 04 Mar 2022 13:32:05 -0500 Message-ID: <3966274.1646418725@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexey M Boltenkov writes: > You need the new v15 feature: > NULLS [NOT] DISTINCT That won't replicate the behavior shown by the OP though. In particular, not the weird inconsistency for all-null rows. regards, tom lane