pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Retroactively adding send and recv functions to a type?
Date: Mon, 19 Aug 2019 14:46:34 -0400
Message-ID: <5790.1566240394@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA_SOw8R8Gnx-7cOAum4TC5wkUjEo725k4JevjjnUcM8ghLgug@mail.gmail.com>
References: <CAA_SOw97LHiS+iqLkXKJ4Sqjc1bagKxQT11R=e=HS460sZ3hYw@mail.gmail.com>
	<CAA_SOw954VvMGi8bt3P5C7FN37Jj=SRxnBjxjPcTZGG8KN_KkQ@mail.gmail.com>
	<23029.1566235939@sss.pgh.pa.us>
	<CAA_SOw8R8Gnx-7cOAum4TC5wkUjEo725k4JevjjnUcM8ghLgug@mail.gmail.com>

"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





view thread (10+ messages)  latest in thread

Message-ID: <5790.1566240394@sss.pgh.pa.us>
Permalink:  ../5790.1566240394@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5790.1566240394@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, johann@myrkraverk.com
  Subject: Re: Retroactively adding send and recv functions to a type?
  In-Reply-To: <5790.1566240394@sss.pgh.pa.us>
  References: <CAA_SOw97LHiS+iqLkXKJ4Sqjc1bagKxQT11R=e=HS460sZ3hYw@mail.gmail.com> <CAA_SOw954VvMGi8bt3P5C7FN37Jj=SRxnBjxjPcTZGG8KN_KkQ@mail.gmail.com> <23029.1566235939@sss.pgh.pa.us> <CAA_SOw8R8Gnx-7cOAum4TC5wkUjEo725k4JevjjnUcM8ghLgug@mail.gmail.com> <5790.1566240394@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox