Re: Add Postgres module info

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Yurii Rashkovskii <yrashk(at)omnigres(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add Postgres module info
Date: 2025-02-17 01:41:56
Message-ID: CAPpHfduL6=LdHco_+wCk=VQyZzEd5hjLi46jtV2gQbDrpXf5Gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Andrei!

On Mon, Dec 16, 2024 at 7:02 AM Andrei Lepikhov <lepihov(at)gmail(dot)com> wrote:
>ly
> On 12/13/24 10:17, Tom Lane wrote:
> > Andrei Lepikhov <lepihov(at)gmail(dot)com> writes:
> >> On 12/12/24 21:02, Yurii Rashkovskii wrote:
> >>> 2. Any reasons to dictate MAJ.MIN format? With semantic versioning
> >>> abound, it's rather common to use MAJ.MIN.PATCH.
> >
> >> Okay, thanks; that's a good catch. I wonder how to follow these rules
> >> with a static fixed-sized structure. I would like to read about any
> >> suggestions and implementation examples.
> >
> > There's nothing stopping a field of the magic block from being
> > a "const char *" pointer to a string literal.
> Ok, See v.2 in attachment.

Generally, the patch looks good to me. I have couple of questions.

1) Is it intended to switch all in-core libraries to use PG_MODULE_MAGIC_EXT()?
2) Once we have module version information, it looks natural to
specify the required version for dependant objects, e.g. SQL-funcions
implemented in shared libraries. For instance,
CREATE FUNCTION ... AS 'MODULE_PATHNAME' LANGUAGE C module_version >= '1.0';
For this, and probably other purposes, it's desirable for version to
be something comparable at SQL level. Should we add some builtin
analogue of pg_text_semver?

------
Regards,
Alexander Korotkov
Supabase

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-02-17 01:42:50 Re: BackgroundPsql swallowing errors on windows
Previous Message Andrew Alsup 2025-02-17 01:21:17 Re: UUID v7