From: | Ed Behn <ed(at)behn(dot)us> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: access numeric data in module |
Date: | 2025-02-08 20:24:03 |
Message-ID: | CAJBL5DN7dAr_2OtTy8s5rn3+buPX=DAC9f21FZZ+iozOstH7HA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 | 16.3 KB |
numeric_var_test.c | text/x-csrc | 2.0 KB |
numeric_var_test.sql | application/sql | 314 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-02-08 21:25:18 | Re: proposal - plpgsql - support standard syntax for named arguments for cursors |
Previous Message | Jeff Davis | 2025-02-08 20:23:39 | Re: Final result (display) collation? |