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 1tiJuX-00ES6i-8D for pgsql-general@arkaria.postgresql.org; Wed, 12 Feb 2025 21:04:45 +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 1tiJuV-00ESBZ-BY for pgsql-general@arkaria.postgresql.org; Wed, 12 Feb 2025 21:04:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tiJuV-00ESBJ-13 for pgsql-general@lists.postgresql.org; Wed, 12 Feb 2025 21:04:43 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tiJuT-000Slo-1t for pgsql-general@lists.postgresql.org; Wed, 12 Feb 2025 21:04:42 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 25F89114011A; Wed, 12 Feb 2025 16:04:41 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 12 Feb 2025 16:04:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1739394280; x=1739480680; bh=1bUN4JytX3tpGemr4bBCT4GY5zNkP7MbWPsODZsVJYs=; b= O44eFYwUFtv9sAHkuRiGUMx35ma1cG4VbrWn0fHigW/7GuldnR1aKn8YD8lE3HOH Q63W7KASmYDfUDDiFVgJxBmFrs+cRGwFEqU5W2xxw8IZ6jFwKnuB532GbCTdwwJQ p2aVk6fmTyG3TQrXfHTAYNfAyQBgMLvLI3e3vG5oGn3T4Hf3hZgyaJtzcn9ceISO vjPNJ/GjoSBDeFJjZ+CmyUd8TLQvCi6hCND5jjmEpLyP4GeqaQeE/CD9pauTBgs1 LBm2K2prNK3nZWvoYqCp5p4PWgbTsd00xSZ8V4OLN2RsdHfDqk7rLutBbt87D6C9 EtW4k3srf/MvL6D9Di9WOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1739394280; x=1739480680; bh=1 bUN4JytX3tpGemr4bBCT4GY5zNkP7MbWPsODZsVJYs=; b=ulhrjuOPVX9gcyf65 rKmK1tdvH2DJGfB5UPhicGlz+3ealve3yG0qCndDxX48Xr7LwtFxlJnQOvaMhwmb 1RSOwoN8SAO1MgTZqDlInbyQx+IPnwyh+NaGCyBll3pqKBj1FqG4/mN+9h9hCZ1r fgo/IHUCy4vX157IKtlMgQL4G94+iDRWFPowIcpLrFavf8+s/C5O88u3s7EYkrDR TYLOfePvHAPt70OmS+a7jumix52viQsk6Ei1sL8f9AY1EPt0k34jXHQkAW3CqRDd qyFxcCnjAhTxvIYbkIgciMbtjXGiJsKNIfIror1+uTCPy+osxhio66Zy1o838CX4 yRY7Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeggeelvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepiedvhfeiheehgeeuieel jeeitedtjeehudegfeelkedvleekhedtgfeiffefkedunecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepmhgrrhgtvghfvghrnhejsehgmhgrihhlrdgtohhmpdhrtghpthhtohep phhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Feb 2025 16:04:39 -0500 (EST) Message-ID: <2d8dda66-d20d-4be0-909a-c042556dc4be@aklaver.com> Date: Wed, 12 Feb 2025 13:04:38 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Best Approach for Swapping a Table with its Copy To: Marcelo Fernandes , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver 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 2/12/25 12:57 PM, Marcelo Fernandes wrote: > Hi folks, > > I have a scenario where I need to swap an original table with a copy of that > table. > Should have added to previous post: Why can't you just add the exclusion constraint to the original table? -- Adrian Klaver adrian.klaver@aklaver.com