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 1pOyTi-00020H-Ms for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Feb 2023 10:12:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pOyTh-0000vi-KD for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Feb 2023 10:12:01 +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 1pOyTh-0000vY-7I for pgsql-hackers@lists.postgresql.org; Mon, 06 Feb 2023 10:12:01 +0000 Received: from lahtoruutu.iki.fi ([2a0b:5c81:1c1::37]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pOyTd-0006sM-GE for pgsql-hackers@postgresql.org; Mon, 06 Feb 2023 10:12:00 +0000 Received: from [192.168.1.113] (dsl-hkibng22-54f8db-125.dhcp.inet.fi [84.248.219.125]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 562911B00138; Mon, 6 Feb 2023 12:11:55 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1675678315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eX626RoW6IfAturjJPXvYkwDBfLuiWTN3ph36by8nRY=; b=Om7Agur4q2onmyhEnvUkaer0L4ifAZ3qFDRxKtUqrIOcE++uWqn0mDixxLUpgqqsxROAKy O9IQ7Ppo/WlTi1GyYcHo5AdGEY5qxasCSwHk8tLdZ42FO7HZi7wJx8drbTKaCPFm4QPvHZ dOgU50o0ETQwCkTQ2PCUSoLOTcy/X+oGSp/NjACxe0RgVjXoGF8s1nHH+jQus3bwBMynq8 cK7LuYpcI83GaNKr9mOmeNtSexhByQnIN9/8T88r9W5ObcLoa5xA39s4v2W83avUZSzSF3 KXqtnb38J/rsNLS/373ARQ+CeyC/5vyFqhPGodzRPBi6ogKAhtstY1qc/hRpVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1675678315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eX626RoW6IfAturjJPXvYkwDBfLuiWTN3ph36by8nRY=; b=cZw6tVs+TbmN1/juXy0tT89oZqQGyXm5IJtwGass0mmGMb+gS6vTp7DYvzGXkOWMLhBIcC h3emQ6pgsgcNXii/wiPgvGjWe+lHvdC2w51AAlg0uxKrZn7DigADtlL1JbH6Q3lH4WX1Fk JQ3Gvsh3n91v5kFk5uYGMj9VJBdSGQsoo7NjnuiWBCLdY5ACQom7CM8Pl7X/J1Tb31z4t1 nn50qCO8HsvHKCZR12/0aWhLWhrrNyvb2gcI6t3qJqSKz9VQ52U6bx3N8kkgpLf9g0M6eh 898DSKYEtg1ofDuRaMvTDjQsx+Fgf6uLklSUoNFmHrRYzYxCoHoP253tZwsQDg== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1675678315; a=rsa-sha256; cv=none; b=asdyrkRpygtnAV90KAvu02NMGAUB13kBmKaH2dLIvPVfsVZbu1smFzmXT0QLQE8miqTlRk VaJctAxmmMlyjX6DZs0NNyRUcVhe0VrItMEOsdoJf3xqDWnbpMjLslQdNx9hDB3zCmspHK gRlZ+aADydFcQjK9BhzJ2ZrWoTCeN8m35I1HReMX04rqFhUl5VgpREmBu8kVDEBbEMPzu9 f05H04CBQVszngo8nBVbAwsLFPqGCDsnhtRF3lcN6TA9WkasI4MzmdTtDVJLnIlRMg4QmI V51Vh8SN3qCxgwoJBK13WH/eGK3IVpXOOA02Qh44PacI75woisqwQDwrEO9A/A== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi Message-ID: Date: Mon, 6 Feb 2023 11:11:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: Consolidate ItemPointer to Datum conversion functions Content-Language: en-US To: Peter Eisentraut , pgsql-hackers References: <844dd4c5-e5a1-3df1-bfaf-d1e1c2a16e45@enterprisedb.com> From: Heikki Linnakangas In-Reply-To: <844dd4c5-e5a1-3df1-bfaf-d1e1c2a16e45@enterprisedb.com> 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 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. - Heikki