Re: access numeric data in module

From: Ed Behn <ed(at)behn(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: access numeric data in module
Date: 2025-03-01 14:30:43
Message-ID: CAJBL5DM8UF6PRex6b01vuFPmoXP53F6KOFCA=+3_a9Xzs7tJpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Upon further review, I've updated the patch. This avoids possible name
conflicts with other functions. See attached.

On Sat, Feb 8, 2025 at 3:24 PM Ed Behn <ed(at)behn(dot)us> wrote:

> I've created a patch (attached) to implement the changes discussed below.
>
> This change moves the definition of the NumericVar structure to numeric.h.
> Function definitions for functions used to work with NumericVar are also
> moved to the header as are definitions of functions used to convert
> NumericVar to Numeric. (Numeric is used to store numeric and decimal types.)
>
> All of this is so that third-party libraries can access numeric and
> decimal values without having to access the opaque Numeric structure.
>
> There is actually no new code. Code is simply moved from numeric.c to
> numeric.h.
>
> This is a patch against branch master.
>
> This successfully compiles and is tested with regression tests.
>
> Also attached is a code sample that uses the change.
>
> Please provide feedback. I'm planning to submit this for the March
> commitfest.
>
> -Ed
>
> On Wed, Sep 18, 2024 at 9:50 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
>> On Sat, Sep 14, 2024 at 2:10 PM Ed Behn <ed(at)behn(dot)us> wrote:
>> > Was there a resolution of this? I'm wondering if it is worth it for
>> me to submit a PR for the next commitfest.
>>
>> Well, it seems like what you want is different than what I want, and
>> what Tom wants is different from both of us. I'd like there to be a
>> way forward here but at the moment I'm not quite sure what it is.
>>
>> --
>> Robert Haas
>> EDB: http://www.enterprisedb.com
>>
>

Attachment Content-Type Size
numericvar_access.patch text/x-patch 45.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2025-03-01 14:55:31 Re: Amcheck verification of GiST and GIN
Previous Message jian he 2025-03-01 14:02:18 Re: bug when apply fast default mechanism for adding new column over domain with default value