| From: | Yurii Rashkovskii <yrashk(at)omnigres(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Andrei Lepikhov <lepihov(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Add Postgres module info |
| Date: | 2025-03-27 02:53:43 |
| Message-ID: | CAG=VW16mY1K1645CbSu41OCfASVRMfQze5h9GbnB3rHqHUw6CQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Mar 26, 2025 at 7:45 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > 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...
>
That's because this is valid in C99/C11; it's just not valid in C++. That
said, I think it's confusing and error-prone.
>
> 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.
>
> I was thinking about passing `.name = NULL, .version = NULL` instead of
`0`—do you have any reservations about this?
Yurii
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2025-03-27 03:09:42 | Re: Use CLOCK_MONOTONIC_COARSE for instr_time when available |
| Previous Message | Tom Lane | 2025-03-27 02:45:22 | Re: Add Postgres module info |