Retroactively adding send and recv functions to a type?

From: "Johann 'Myrkraverk' Oskarsson" <johann(at)myrkraverk(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Retroactively adding send and recv functions to a type?
Date: 2019-08-19 17:03:10
Message-ID: CAA_SOw97LHiS+iqLkXKJ4Sqjc1bagKxQT11R=e=HS460sZ3hYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear PostgreSQL General,

I wish to add the send and recv functions to a type I didn't write
myself. The help for ALTER TABLE seems to indicate this is not
supported directly. How can I achieve this?

The extension in question is hashtypes on pgxn,

https://pgxn.org/dist/hashtypes/

and I did not write it myself, but do want to add support for binary
send and recv.

I have a 48GB table already populated with sha1, and I'd rather not
have to drop it in order to upgrade the extension. Also, if I do
this, do I make the extension non-automatically-ugradeable? That is,
is there a way to write an upgrade script from a version without send
and recv, to a version with it?

--
Johann

I'm not from the internet, I just work there.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Johann 'Myrkraverk' Oskarsson 2019-08-19 17:26:02 Re: Retroactively adding send and recv functions to a type?
Previous Message Adrian Klaver 2019-08-19 16:43:29 Re: Sorry, real newbie question about connecting to a database