Re: CREATE EXTENSION forces an library initialization - is it bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: CREATE EXTENSION forces an library initialization - is it bug?
Date: 2023-09-29 18:14:24
Message-ID: 1388084.1696011264@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> I had to fix plpgsql_check issue
> https://github.com/okbob/plpgsql_check/issues/155

> The problem is in execution of _PG_init() in CREATE EXTENSION time.

> It is a problem for any extension that uses plpgsql debug API, because it
> is quietly activated.

> Is it necessary?

Yes, I think so. If the extension has any C functions, then when its
script executes those CREATE FUNCTION commands then the underlying
library will be loaded (so we can check that the library is loadable
and the functions really exist). That's always happened and I do not
think it is negotiable.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2023-09-29 18:19:22 Re: CREATE EXTENSION forces an library initialization - is it bug?
Previous Message Pavel Stehule 2023-09-29 18:10:10 CREATE EXTENSION forces an library initialization - is it bug?