Re: Retroactively adding send and recv functions to a type? - Mailing list pgsql-general

From Tom Lane
Subject Re: Retroactively adding send and recv functions to a type?
Date
Msg-id 5790.1566240394@sss.pgh.pa.us
Whole thread Raw
In response to Re: Retroactively adding send and recv functions to a type?  ("Johann 'Myrkraverk' Oskarsson" <johann@myrkraverk.com>)
Responses Re: Retroactively adding send and recv functions to a type?
List 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 by date:

Previous
From: "Johann 'Myrkraverk' Oskarsson"
Date:
Subject: Re: Retroactively adding send and recv functions to a type?
Next
From: stan
Date:
Subject: Collumn level permissions ?