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 1nhHNl-0007pJ-Ob for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Apr 2022 20:57:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nhHNk-0005I2-Ky for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Apr 2022 20:57:00 +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 1nhHNk-0005Hs-BR for pgsql-hackers@lists.postgresql.org; Wed, 20 Apr 2022 20:57:00 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nhHNh-0003lw-6b for pgsql-hackers@lists.postgresql.org; Wed, 20 Apr 2022 20:56:59 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 955793201FB9; Wed, 20 Apr 2022 16:56:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 20 Apr 2022 16:56:55 -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=1650488215; x=1650574615; bh=cfiIQq8jjL5Lv D+BIaExqhaQZ/nJS6BaFbgFsEWt7lc=; b=hjlbx59lz0SkUf33YbhYwKxNmnTxs h9fNHDaxDHdZCPc9vjv6JavV+lljgBjiLp1EmTbPR97Sxy/dWxnqSEbcrLNXkU5d p5ypOUWdIppi3h6j+MkqRxghtbjtAYi670vhuKMQbkLZpSv4WCTkOTfE8/kuMVcW K9AfeS8fhO+n/gS70iRPrsqfulLCD99Hcx9FbTooeNGPl09kP5+E9EkQxJ+a3lD8 lLlHwLOfYYSkMuDHBL0ERGwRgbiTWPZYyw52f/+VIjCIhOZFhxc5nCyJxN53Wo9q MR453h6+BIBVpC7FJQbCiuHYRQXLrr7skRTF+lTpY/rwxtc6oe5ycbFzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrtddtgdduvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Apr 2022 16:56:54 -0400 (EDT) Message-ID: <2eab924a-9667-d287-5e84-a3c54d5f433e@enterprisedb.com> Date: Wed, 20 Apr 2022 22:56:53 +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: renumber_oids.pl needs some updates Content-Language: en-US To: Tom Lane , pgsql-hackers@lists.postgresql.org Cc: John Naylor References: <2995325.1650487527@sss.pgh.pa.us> From: Peter Eisentraut In-Reply-To: <2995325.1650487527@sss.pgh.pa.us> 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 20.04.22 22:45, Tom Lane wrote: > I think the right way to fix #2 is to put the responsibility for > generating the #define's into genbki.pl, instead of this mistake-prone > approach of duplicating the OID constants in the source code. > > The attached proposed patch invents a variant macro > DECLARE_TOAST_WITH_MACRO for the relatively small number of cases > where we need such OID macros. This makes sense. A more elaborate (future) project would be to have genbki.pl generate all of IsSharedRelation(), which is the only place these toast-table-OID macros are used, AFAICT.