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 1nhtUm-0007E9-DD for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Apr 2022 13:38:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nhtUl-0003F6-8f for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Apr 2022 13:38:47 +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 1nhtUk-0003Ex-9U for pgsql-hackers@lists.postgresql.org; Fri, 22 Apr 2022 13:38:46 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nhtUf-0000Mi-Vy for pgsql-hackers@postgresql.org; Fri, 22 Apr 2022 13:38:45 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6C8775C024C; Fri, 22 Apr 2022 09:38:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 22 Apr 2022 09:38:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1650634719; x=1650721119; bh=hqOQepTczLIlK U0shMAwaXDvWmYNkyZUtnhGtw/xTf8=; b=B15IrHVTT5DhEiSwnurqzmrRQp3uI Ku8zjojdFKDnG9if3TgDxukZV5UYgLyopQcRpbECwTyEXKMUQs4YNnAKkVZCU7wL Rodtgrd7atLIbcyf057+6NW8S5m8sieArE5WwRSpI0VAEtewr/ef4/U2+m+C6bSA g2Si7N1lhAn/QYLkOFoAbVToFYIaC5NE82USWZ9917vHpceIi+1dCTAs3zPw2GOO vduC/6QlaeRINd3pmuOi4d4gG+TpIXdVaTMqelK66wDpV2nA6Hek6DtNknnYZFp2 FhVI9TMlV0ARP0A7Uxfkb5Oc3Iie4Pkhrta8C3pfa+b9dTELDktwgXfUQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrtdeggdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeetiefh leetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Apr 2022 09:38:37 -0400 (EDT) Message-ID: <29672d7c-7000-2467-a99b-33a9a79d55ea@enterprisedb.com> Date: Fri, 22 Apr 2022 15:38:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: Dump/Restore of non-default PKs Content-Language: en-US To: Simon Riggs Cc: Tom Lane , "David G. Johnston" , PostgreSQL Hackers References: <2379840.1650314887@sss.pgh.pa.us> <62224288-cbc0-a759-4ff6-40baa32943eb@enterprisedb.com> From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 21.04.22 13:43, Simon Riggs wrote: >> 1. create the table without primary key >> 2. create the index >> 3. attach the index as primary key constraint >> >> That doesn't sound attractive. > Can you explain what you find unattractive about it? Well, if I want to create a table with a primary key, the established way is to say "primary key", not to have to assemble it from multiple pieces. I think this case is very similar to exclusion constraints, which also have syntax to specify the index access method.