Re: Retroactively adding send and recv functions to a type?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Retroactively adding send and recv functions to a type?
Дата
Msg-id 5790.1566240394@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Retroactively adding send and recv functions to a type?  ("Johann 'Myrkraverk' Oskarsson" <johann@myrkraverk.com>)
Ответы Re: Retroactively adding send and recv functions to a type?  ("Johann 'Myrkraverk' Oskarsson" <johann@myrkraverk.com>)
Список pgsql-general
"Johann 'Myrkraverk' Oskarsson" <johann@myrkraverk.com> writes:
> On Tue, Aug 20, 2019 at 1:32 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> You could manually update the pg_type row, and then if you were
>> being fussy, add pg_depend entries showing the type depends on
>> the functions.

> Can I do this in a future proof way?  That is, is there a way to make
> that into an upgrade script, or will I make the extension
> un-upgradable doing that?

[ shrug... ]  Depends what you consider "future proof".  I should think
that if pg_type.typsend goes away or changes meaning, for example,
that would be reflective of changes large enough to break an extension
dabbling in binary I/O in other ways anyway.

Inserting new rows into pg_depend manually is a bit riskier, but I
don't think that catalog has changed since its inception, so it's
not all that risky.

In any case, you could limit the lifespan of the upgrade script,
if you roll it up into a new base install script ASAP.

            regards, tom lane



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

Предыдущее
От: "Johann 'Myrkraverk' Oskarsson"
Дата:
Сообщение: Re: Retroactively adding send and recv functions to a type?
Следующее
От: stan
Дата:
Сообщение: Collumn level permissions ?