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 1pRV77-00022r-Gu for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Feb 2023 09:27:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRV75-0003Do-Li for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Feb 2023 09:27:07 +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 1pRV75-0003De-BL for pgsql-hackers@lists.postgresql.org; Mon, 13 Feb 2023 09:27:07 +0000 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRV72-0007xh-BG for pgsql-hackers@postgresql.org; Mon, 13 Feb 2023 09:27:06 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 0F89A2B067A1; Mon, 13 Feb 2023 04:27:00 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 13 Feb 2023 04:27:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id: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=1676280420; x=1676287620; bh=z W2Vau7139vUzpWtodO7EW4syJ3l5mRQ+bZZHH18sCE=; b=jIC4wGHoapVeYbmNO GoAuQ+0jB6YSyfMurcwqzRJORc17ckKLpGyYABLuLonstT12p6RwikOhS/DgecWN NAp2QqrSQmlRnsu1nDMW7K7dRTFghldzXsiQseDJ2oSR6+RtQBYOz1wdHmDVhfh4 C9qv67Z6RXY+0/PQakvzIMBvzP5UBpWy1jXUlOKbswWpA3q4URBNa/ZIxqm2KKk0 7OR1rMn4zalH7RB/GkRTJsaARbj43disf+a782VXhlwU+bKJ7qPVCWbYp25/B52D +PbRvb11/bGRruCZ7We6mp4MyZcTAenP5WkVFlnUvzxUZFtntIB0T/i1shB9hASC ea/Sg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeiuddgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffhvfhfjggtgfesthekredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepfeeggfetfeduheehudff veelhfekueelhfffgfdvlefgffeuudeltdfgkeeihfejnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Feb 2023 04:26:59 -0500 (EST) Message-ID: Date: Mon, 13 Feb 2023 10:26:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Consolidate ItemPointer to Datum conversion functions Content-Language: en-US From: Peter Eisentraut To: Heikki Linnakangas , pgsql-hackers References: <844dd4c5-e5a1-3df1-bfaf-d1e1c2a16e45@enterprisedb.com> <5f6ed461-331f-47b5-9ce2-90fc660d78f5@enterprisedb.com> In-Reply-To: <5f6ed461-331f-47b5-9ce2-90fc660d78f5@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 09.02.23 09:33, Peter Eisentraut wrote: > On 06.02.23 11:11, Heikki Linnakangas wrote: >> On 06/02/2023 11:54, Peter Eisentraut wrote: >>> Instead of defining the same set of macros several times, define it once >>> in an appropriate header file.  In passing, convert to inline functions. >> >> Looks good to me. Did you consider moving PG_GETARG_ITEMPOINTER and >> PG_RETURN_ITEMPOINTER, too? They're only used in tid.c, but for most >> datatypes, we define the PG_GETARG and PG_RETURN macros in the same >> header file as the the Datum conversion functions. > > Yeah that makes sense.  Here is an updated patch for that. committed