From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Subject: | Re: Convert *GetDatum() and DatumGet*() macros to inline functions |
Date: | 2022-08-30 14:16:45 |
Message-ID: | CA+TgmoZ31wevR0oJo4sGyYay46-+UMHPUpcSS8Zb4mwQgMcfjw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 30, 2022 at 10:13 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Aleksander Alekseev <aleksander(at)timescale(dot)com> writes:
> > Just to clarify, a break in this case is going to be the fact that we
> > are adding new functions, although inlined, correct? Or maybe
> > something else? I'm sorry this is the first time I encounter the
> > question of ABI compatibility in the context of Postgres, so I would
> > appreciate it if you could elaborate a bit.
>
> After absorbing a bit more caffeine, I suppose that replacing a
> macro with a "static inline" function would not be an ABI break,
> at least not with most modern compilers, because the code should
> end up the same. I'd still vote against back-patching though.
> I don't think the risk-reward ratio is good, especially not for
> the pre-C99 branches which don't necessarily have "inline".
Yeah, I don't see a reason to back-patch a change like this, certainly
not right away. If over time it turns out that the different
definitions on different branches cause too many headaches, we could
reconsider. However, I'm not sure that will happen, because the whole
point is that the static inline functions are intended to behave in
the same way as the macros, just with better type-checking.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-08-30 14:17:34 | Re: Reducing the chunk header sizes on all memory context types |
Previous Message | Tom Lane | 2022-08-30 14:13:20 | Re: Convert *GetDatum() and DatumGet*() macros to inline functions |