Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtkwd-00DnkL-UO for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Oct 2023 08:33:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qtkwb-00FD5h-I9 for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Oct 2023 08:33:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtkwa-00FD4u-Rg for pgsql-hackers@lists.postgresql.org; Fri, 20 Oct 2023 08:33:21 +0000 Received: from m15.mail.163.com ([45.254.50.219]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qtkwP-001gV1-RJ for pgsql-hackers@lists.postgresql.org; Fri, 20 Oct 2023 08:33:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=7nxNXCi5r8JJpotR7SLlh/ctBNxdWA1cAuqwTyifZqM=; b=dcHecZzu7DFGTdGdRVBi9A827TnfxJ5/7fVb13gpO9LER97F0hd7VC3DKNuP3p 5gvjlheTUcg5jR96c2TMn5ADwlIbN3A7lYfj6e+cERpCtcc4Y/nQDkGOcpoo/+fE Nf6ZKV7Ku6T3vGiOUHnRe0d4kRO8CkPP+jgZmL90WIPu8= Received: from e18c07352.et15sqa (unknown [140.205.118.232]) by zwqz-smtp-mta-g0-2 (Coremail) with SMTP id _____wDnj0w9OzJlckkGAQ--.62649S3; Fri, 20 Oct 2023 16:33:01 +0800 (CST) References: <7mlamswjp81p.fsf@e18c07352.et15sqa> <7mla7cnmue6q.fsf@e18c07352.et15sqa> User-agent: mu4e 1.8.15; emacs 29.1 From: zhihuifan1213@163.com To: jian he Cc: pgsql-hackers@lists.postgresql.org Subject: Re: UniqueKey v2 Date: Fri, 20 Oct 2023 16:29:16 +0800 In-reply-to: Message-ID: <7mla7cnh4rsy.fsf@e18c07352.et15sqa> MIME-Version: 1.0 Content-Type: text/plain X-CM-TRANSID:_____wDnj0w9OzJlckkGAQ--.62649S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU7YhFUUUUU X-Originating-IP: [140.205.118.232] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/xtbBZx4PU1euA3udrAAAsV List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > i did some simple tests using text data type. > > it works with the primary key, not with unique indexes. > it does not work when the column is unique, not null. > > The following is my test. Can you simplify your test case please? I can't undertand what "doesn't work" mean here and for which case. FWIW, this feature has nothing with the real data, I don't think inserting any data is helpful unless I missed anything. -- Best Regards Andy Fan