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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Johann 'Myrkraverk' Oskarsson" <johann(at)myrkraverk(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Retroactively adding send and recv functions to a type?
Date: 2019-08-19 18:46:34
Message-ID: 5790.1566240394@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Johann 'Myrkraverk' Oskarsson" <johann(at)myrkraverk(dot)com> writes:
> On Tue, Aug 20, 2019 at 1:32 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message stan 2019-08-19 19:17:02 Collumn level permissions ?
Previous Message Shital A 2019-08-19 18:06:56 Re: Pgsql resource agent of pacemaker