Re: Allowing extensions to find out the OIDs of their member objects

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: Allowing extensions to find out the OIDs of their member objects
Дата
Msg-id 5C451AB8.2080302@anastigmatix.net
обсуждение исходный текст
Ответ на Re: Allowing extensions to find out the OIDs of their member objects  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Allowing extensions to find out the OIDs of their member objects  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 01/20/19 19:43, Tom Lane wrote:
>> If the extension script could somehow be informed at CREATE EXTENSION time
>> of what its OID is, that would clear the way for ALTER EXTENSION RENAME, no?
> 
> And it remembers that where?

Top level answer: up to the extension author.

Next level answer: maybe not all extensions have libraries to load,
but for those that do (a good portion), wouldn't it be convenient
for _PG_init() to get the value, either passed as an argument, or
through some API?

After the extension is created, loading of the library is going to be
occasioned through the call of some function, right? That function
just got looked up, and it has an 'e' dependency recorded on the
extension, giving the extension OID.

I can't judge whether that's too much lookup action for the library
load machinery to be doing; how frequent are library loads, and how
much would that add to the cycles they already require?

Regards,
-Chap


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Imai, Yoshikazu"
Дата:
Сообщение: RE: speeding up planning with partitions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Allowing extensions to find out the OIDs of their member objects