Re: Add Postgres module info

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yurii Rashkovskii <yrashk@omnigres.com>
Cc: Andrei Lepikhov <lepihov@gmail.com>, Euler Taveira <euler@eulerto.com>, Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>, Alexander Korotkov <aekorotkov@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-27T02:45:22Z
Lists: pgsql-hackers
Yurii Rashkovskii <yrashk@omnigres.com> writes:
> This recent patch is great but causes a small problem. It mixes designated
> and non-designated initializers, specifically in `PG_MODULE_MAGIC_DATA(0)`.

Ugh.  I felt a bit itchy about that, but my compiler wasn't
complaining...

Can you propose a specific change to clean it up?  I wanted to write
just "PG_MODULE_MAGIC_DATA()", but I'm not sure that's valid C either.

			regards, tom lane



Commits

  1. Avoid mixing designated and non-designated field initializers.

  2. Use PG_MODULE_MAGIC_EXT in our installable shared libraries.

  3. Introduce PG_MODULE_MAGIC_EXT macro.