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 1oBK5c-0007D7-TV for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Jul 2022 17:54:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oBK5b-0000dl-I4 for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Jul 2022 17:54:27 +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 1oBK5b-0000dc-8q for pgsql-hackers@lists.postgresql.org; Tue, 12 Jul 2022 17:54:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBK5Z-0003xG-3Y for pgsql-hackers@postgresql.org; Tue, 12 Jul 2022 17:54:26 +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 26CHsMH81662560; Tue, 12 Jul 2022 13:54:22 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , Thomas Munro , pgsql-hackers Subject: Re: Cleaning up historical portability baggage In-reply-to: <20220712173352.trdeq66asbv6vf2q@awork3.anarazel.de> References: <20220712173352.trdeq66asbv6vf2q@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 12 Jul 2022 10:33:52 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1662558.1657648462.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 12 Jul 2022 13:54:22 -0400 Message-ID: <1662559.1657648462@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > Redefining functions, be it by linking in something or by redefining fun= ction > names via macros, is a mess. There's places where we then have to undefi= ne > some of these things to be able to include external headers etc. Some > functions are only replaced in backends, others in frontend too. It make= s it > hard to know what exactly the assumed set of platform primitives is. Etc= . In the cases at hand, we aren't doing that, are we? The replacement function is only used on platforms that lack the relevant POSIX function, so it's hard to argue that we're replacing anything. regards, tom lane