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 1kajrw-0005m4-IC for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Nov 2020 18:20:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kajrv-0003SE-Fr for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Nov 2020 18:20:19 +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 1kajru-0003S7-Dm for pgsql-hackers@lists.postgresql.org; Thu, 05 Nov 2020 18:20:19 +0000 Received: from forward5-smtp.messagingengine.com ([66.111.4.239]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kajrp-00005F-Db for pgsql-hackers@postgresql.org; Thu, 05 Nov 2020 18:20:17 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.nyi.internal (Postfix) with ESMTP id 557D91942DFE; Thu, 5 Nov 2020 13:20:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 05 Nov 2020 13:20:10 -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:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Ad7Shfu9R4Jno9o5vNff4TJs1ACeltrkCla2QiNYJ EU=; b=UNdTM9pk033WwRMjPtRyH/p4wmQW/9d1kdwfQOcl+ySnIjs+O/cEd897O 0g+a44FXR03qVXNprhySgzHyRgKGROHy4LLskddtllKWSWn11oXSGzjyV6jZ5Wv9 z7ecXpUyyOn2mjJ7i28jisGH3hbmsUHTDayfdJUGAh/H4w1DkrWjJHHxeAJrZBwS hMfMCL0GyCmJ5YuRsD+UgNhESES+xwHnwhuYXKGVq2qIXEqc64YiOdV8navkOJbX po+qZDu2YK0cCiB8q969AcpcV+QbCglW1tM5rnumQLyqTxvxxA6pDFyJc0Ao9KhW 8Q5S7w+RrBOETi8hD1fvX/jffoI0A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtjedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnh guqhhurggurhgrnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpedtveeghedtjedvvedv leejueevjeejtdellefgkeelfeeikeejlefgkedtudeuvdenucffohhmrghinhepvdhnug hquhgrughrrghnthdrtghomhenucfkphepkeejrddujeejrdejhedrleegnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghish gvnhhtrhgruhhtsedvnhguqhhurggurhgrnhhtrdgtohhm X-ME-Proxy: Received: from april.pezone.net (p57b14b5e.dip0.t-ipconnect.de [87.177.75.94]) by mail.messagingengine.com (Postfix) with ESMTPA id 7681132801F2; Thu, 5 Nov 2020 13:20:09 -0500 (EST) Subject: Re: Move catalog toast table and index declarations To: John Naylor References: <1983ae60-5fde-8393-029d-ce016d5fce78@2ndquadrant.com> Cc: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <281df85e-5667-57b0-a5e8-88bfc455c14d@2ndquadrant.com> Date: Thu, 5 Nov 2020 19:20:06 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-11-05 12:59, John Naylor wrote: > I think we're talking past eachother. Here's a concrete example: > > #define BKI_ROWTYPE_OID(oid,oidmacro) > #define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable > > I understand these to be functionally equivalent as far as what the C > compiler sees. The issue is that you can't have a bare semicolon at the top level of a C compilation unit, at least on some compilers. So doing #define FOO(stuff) /*empty*/ and then FOO(123); won't work. You need to fill the definition of FOO with some stuff to make it valid. BKI_ROWTYPE_OID on the other hand is not used at the top level like this, so it can be defined to empty. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services