Re: access numeric data in module

Ed Behn <ed@behn.us>

From: Ed Behn <ed@behn.us>
To: pgsql-hackers@postgresql.org
Date: 2025-03-01T14:30:43Z
Lists: pgsql-hackers

Attachments

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@behn.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@gmail.com> wrote:
>
>> On Sat, Sep 14, 2024 at 2:10 PM Ed Behn <ed@behn.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
>>
>