Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seb6K-009J5R-6O for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Aug 2024 14:05:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1seb6I-00H3NQ-3B for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Aug 2024 14:05:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seb6H-00H3N5-Of for pgsql-hackers@lists.postgresql.org; Thu, 15 Aug 2024 14:05:13 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seb6E-004s5u-Ub for pgsql-hackers@lists.postgresql.org; Thu, 15 Aug 2024 14:05:12 +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 47FE57cj451804; Thu, 15 Aug 2024 10:05:07 -0400 From: Tom Lane To: Peter Eisentraut cc: Paul Jungwirth , Aleksander Alekseev , PostgreSQL Hackers Subject: Re: format_datum debugging function In-reply-to: <4f87171d-1623-4acf-8d7e-80a714ae68ea@eisentraut.org> References: <286814e4-46d4-44d6-be45-c2ee979021e1@illuminatedcomputing.com> <463c034f-a1bb-4361-ada7-83e994d86bfb@illuminatedcomputing.com> <991fd3e7-f414-4320-8674-e9651ece1b4e@illuminatedcomputing.com> <4f87171d-1623-4acf-8d7e-80a714ae68ea@eisentraut.org> Comments: In-reply-to Peter Eisentraut message dated "Thu, 15 Aug 2024 09:50:15 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <451802.1723730707.1@sss.pgh.pa.us> Date: Thu, 15 Aug 2024 10:05:07 -0400 Message-ID: <451803.1723730707@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > On 14.08.24 17:46, Paul Jungwirth wrote: >> Are you doing something to get macro expansion? I've never gotten my gdb >> to see #defines, although in theory this configure line should do it, >> right?: > Oh I see, you don't have the F_* constants available then. Maybe just > put in the OID manually then? That's pretty illegible and error-prone. I agree that writing the output function's C name is noticeably better. However, I would call the result DirectOutputFunctionCall and put it near OidOutputFunctionCall in fmgr.c. It's not like we don't already have a naming convention and many instances of this. (Also, now that I look at the code, I wonder why it looks so little like any of the existing DirectFunctionCall functions.) regards, tom lane