Re: Add Postgres module info - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add Postgres module info
Date
Msg-id 516759.1733946848@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add Postgres module info  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2024-12-11 13:21:03 -0500, Tom Lane wrote:
>> There are a couple of ways that we could deal with the API
>> seen by module authors:

> To be future proof, I think it'd be good to declare the arguments as
> designated initializers. E.g. like

> PG_MODULE_MAGIC_EXT(
>   .version = 10000,
>   .threadsafe = 1
> );

Yeah, I'd come to pretty much the same conclusion after sending
my email.  That looks like it should work and be convenient
to extend further.

The other possibly-non-obvious bit is that we should probably
invent a sub-structure holding the ABI-related fields, so as to
minimize the amount of rewriting needed in dfmgr.c.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add Postgres module info
Next
From: Nathan Bossart
Date:
Subject: Re: Make use of pg_memory_is_all_zeros() in more places