Re: Add Postgres module info

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Alexander Korotkov <aekorotkov(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-03-02 18:35:35
Message-ID: 2e6681a4-5080-42bf-b930-772a8dec85e5@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17/2/2025 02:41, Alexander Korotkov wrote:
> On Mon, Dec 16, 2024 at 7:02 AM Andrei Lepikhov <lepihov(at)gmail(dot)com> wrote:
>> On 12/13/24 10:17, Tom Lane wrote:
>>> 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()?
I haven't such intention. Just wanted to demonstrate how it might work.

> 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';
Just to be clear. You want this stuff to let the core manage situations
of stale binaries and throw an error like the following:
"No function matches the given name, argument types and module version"
Do I understand you correctly?
It may make sense, but I can't figure out a use case. Could you describe
at least one example?

--
regards, Andrei Lepikhov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2025-03-02 19:35:14 Re: Add Postgres module info
Previous Message Jim Jones 2025-03-02 18:26:10 Re: Logging which local address was connected to in log_line_prefix