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 1mpXqK-0007yI-8S for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Nov 2021 15:36:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mpXqJ-0004u6-6U for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Nov 2021 15:36:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpXqI-0004tx-9u for pgsql-hackers@lists.postgresql.org; Tue, 23 Nov 2021 15:36:22 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpXqF-0004X8-P9 for pgsql-hackers@postgresql.org; Tue, 23 Nov 2021 15:36:21 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 9375D3201C74; Tue, 23 Nov 2021 10:36:18 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 23 Nov 2021 10:36:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=UqF/oi/7OW5MNlinuL0uua1J25b7DD8UJXrp1ufFbFM=; b=d2c87XmM 9nZyEscnW+Br8CsUYAUCG+Zj29iVs31WWWWF20D1yUljT8G3qwPDqe2D5DbN7px8 mXZ/+IHibwynXF5JGB2G0w/wgpKl6kfxwxrgkkXetJtAKqrgb4Q1UgRWL55lGKWC deEXL2xsv9l+0rBLNsuJ7btI9BaFA9Hpj/HTszAVD3XCbB4GvUCwAuWPS3fflUTx x0ZnUUYIKCNAtJSmdTS89kOsdKZubqp91fqbBpGgUKQ04m6giy4rTn8/EchUBbeC NY0DwCKrGaDj7uPPlwyrX4W2cKa7PS7lbftDLxrdctuOM3sllIVEDz3m8pEKGcq6 URz3TzMXmjZoTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgeeigdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeevjedu feeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Nov 2021 10:36:17 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0FD002A0779; Tue, 23 Nov 2021 12:36:15 -0300 (-03) Date: Tue, 23 Nov 2021 12:36:15 -0300 From: Alvaro Herrera To: Peter Eisentraut Cc: Michael Paquier , pgsql-hackers Subject: Re: Some RELKIND macro refactoring Message-ID: <202111231536.b56wwkvlg2m7@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202111231519.kf27gjzikeko@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Nov-23, Alvaro Herrera wrote: > On 2021-Nov-22, Peter Eisentraut wrote: > > > Maybe > > > > else > > { > > Assert(RELKIND_HAS_STORAGE(rel->rd_rel->relkind); > > RelationCreateStorage(rel->rd_node, relpersistence); > > } > > > > create_storage is set earlier based on RELKIND_HAS_STORAGE(), so this would > > be consistent. > > Hmm, right ... but I think we can make this a little simpler. How about > the attached? This doesn't actually work, so nevermind that. -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/ Essentially, you're proposing Kevlar shoes as a solution for the problem that you want to walk around carrying a loaded gun aimed at your foot. (Tom Lane)