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 1snf9g-005BoK-KK for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Sep 2024 14:14:13 +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 1snf9g-00Cray-Bp for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Sep 2024 14:14:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1snf9g-00Crae-22 for pgsql-hackers@lists.postgresql.org; Mon, 09 Sep 2024 14:14:12 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1snf9c-000JRq-AQ for pgsql-hackers@postgresql.org; Mon, 09 Sep 2024 14:14:11 +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 489EE3LR3142463; Mon, 9 Sep 2024 10:14:04 -0400 From: Tom Lane To: Ed Behn cc: pgsql-hackers@postgresql.org Subject: Re: access numeric data in module In-reply-to: References: Comments: In-reply-to Ed Behn message dated "Mon, 09 Sep 2024 07:57:59 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3142461.1725891243.1@sss.pgh.pa.us> Date: Mon, 09 Sep 2024 10:14:03 -0400 Message-ID: <3142462.1725891243@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ed Behn writes: > I want to be able to have a function received and/or return numeric data. > However, I'm having trouble getting data from Datums and building Datums to > return. numeric.h does not contain the macros to do this. They are in > numeric.c. > Is there a way to access the values in the numeric structures? If not, > would a PR to move macros to numeric.h be welcome in the next commitfest? It's intentional that that stuff is not exposed, so no. What actual functionality do you need that numeric.h doesn't expose? regards, tom lane