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 1lON3D-00023k-ID for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Mar 2021 16:05:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lON3C-0008GJ-GI for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Mar 2021 16:05:06 +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 1lON3C-0008GC-9U for pgsql-hackers@lists.postgresql.org; Mon, 22 Mar 2021 16:05:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lON3A-0002ff-7k for pgsql-hackers@lists.postgresql.org; Mon, 22 Mar 2021 16:05:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12MG4wE2574945; Mon, 22 Mar 2021 12:04:58 -0400 From: Tom Lane To: Robert Haas cc: Dilip Kumar , Justin Pryzby , Andres Freund , Tomas Vondra , David Steele , Ildus Kurbangaliev , Dmitry Dolgov <9erthalion6@gmail.com>, Andrey Borodin , PostgreSQL Hackers Subject: Re: [HACKERS] Custom compression methods (mac+lz4.h) In-reply-to: References: <301730.1616276227@sss.pgh.pa.us> <20210320231957.GX11765@telsasoft.com> <309337.1616287493@sss.pgh.pa.us> <311370.1616290403@sss.pgh.pa.us> <414943.1616358751@sss.pgh.pa.us> <20210321204148.GB4203@telsasoft.com> <456616.1616360715@sss.pgh.pa.us> <504396.1616368310@sss.pgh.pa.us> <20210321234324.GC4203@telsasoft.com> <507597.1616370729@sss.pgh.pa.us> <558766.1616424108@sss.pgh.pa.us> <574197.1616428079@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 22 Mar 2021 11:59:18 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <574943.1616429098.1@sss.pgh.pa.us> Date: Mon, 22 Mar 2021 12:04:58 -0400 Message-ID: <574944.1616429098@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Mon, Mar 22, 2021 at 11:48 AM Tom Lane wrote: >> Possibly the former names should survive and the latter become >> wrappers around them, not sure. But we shouldn't be using the "4B" >> terminology anyplace except this part of postgres.h. > I would argue that it shouldn't be used any place at all, and that we > ought to go the other direction and get rid of the existing macros - > e.g. change #define VARATT_IS_1B_E to #define VARATT_IS_EXTERNAL > instead of defining the latter as a no-value-added wrapper around the > former. Maybe at one time somebody thought that the test for > VARATT_IS_EXTERNAL might someday have more cases than just > VARATT_IS_1B_E, but that's not looking like a good bet in 2021. Maybe. I think the original idea was exactly what the comment says, to have a layer of macros that'd deal with endianness issues and no more. That still seems like a reasonable plan to me, though perhaps it wasn't executed very well. regards, tom lane