pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <lepihov@gmail.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Yurii Rashkovskii <yrashk@omnigres.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Add Postgres module info
Date: Sun, 2 Mar 2025 19:35:35 +0100
Message-ID: <2e6681a4-5080-42bf-b930-772a8dec85e5@gmail.com> (raw)
In-Reply-To: <CAPpHfduL6=LdHco_+wCk=VQyZzEd5hjLi46jtV2gQbDrpXf5Gw@mail.gmail.com>
References: <dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com>
	<506788.1733941263@sss.pgh.pa.us>
	<2c215c98-f713-4c5b-b21a-a4b8fa41890b@gmail.com>
	<556341.1733967371@sss.pgh.pa.us>
	<0844622e-9967-409a-8038-470a36f1039c@gmail.com>
	<CAG=VW14ZmKDcxYs7irSvhVS+JeDg2W_gyR++L2GXEpzVVYQ+Yw@mail.gmail.com>
	<8b81a3c0-761f-4cfb-97c6-68819fe4d282@gmail.com>
	<982748.1734059835@sss.pgh.pa.us>
	<0e82bf8c-ae70-498d-861e-dba2bb154cad@gmail.com>
	<CAPpHfduL6=LdHco_+wCk=VQyZzEd5hjLi46jtV2gQbDrpXf5Gw@mail.gmail.com>

On 17/2/2025 02:41, Alexander Korotkov wrote:
> On Mon, Dec 16, 2024 at 7:02 AM Andrei Lepikhov <lepihov@gmail.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





view thread (52+ messages)  latest in thread

Message-ID: <2e6681a4-5080-42bf-b930-772a8dec85e5@gmail.com>
Permalink:  ../2e6681a4-5080-42bf-b930-772a8dec85e5@gmail.com/
Also on:    postgresql.org/message-id/2e6681a4-5080-42bf-b930-772a8dec85e5@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: lepihov@gmail.com, aekorotkov@gmail.com, tgl@sss.pgh.pa.us, yrashk@omnigres.com
  Subject: Re: Add Postgres module info
  In-Reply-To: <2e6681a4-5080-42bf-b930-772a8dec85e5@gmail.com>
  References: <dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com> <506788.1733941263@sss.pgh.pa.us> <2c215c98-f713-4c5b-b21a-a4b8fa41890b@gmail.com> <556341.1733967371@sss.pgh.pa.us> <0844622e-9967-409a-8038-470a36f1039c@gmail.com> <CAG=VW14ZmKDcxYs7irSvhVS+JeDg2W_gyR++L2GXEpzVVYQ+Yw@mail.gmail.com> <8b81a3c0-761f-4cfb-97c6-68819fe4d282@gmail.com> <982748.1734059835@sss.pgh.pa.us> <0e82bf8c-ae70-498d-861e-dba2bb154cad@gmail.com> <CAPpHfduL6=LdHco_+wCk=VQyZzEd5hjLi46jtV2gQbDrpXf5Gw@mail.gmail.com> <2e6681a4-5080-42bf-b930-772a8dec85e5@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox