Change location of function/type installed from C-extension

From: Dmitry Lazurkin <dilaz03(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Change location of function/type installed from C-extension
Date: 2017-08-24 15:11:01
Message-ID: 12b81942-2c63-f398-916c-bf7f32bdddc6@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello.

I have database with installed pg_trgm extension with module path
'/usr/lib/pg_trgm' (yes, this is mistake without $libdir (: ). Now I
want upgrade postgresql to new major version. I keep old version 9.3 in
/opt/postgresql/9.3 and new version 9.6 in /usr. Old version $libdir -
/opt/postgresql/9.3/lib, new version $libdir - /usr/lib/postgresql. So
now I am in trap because old version try to load shared libarry from
'/usr/lib/pg_trgm'. So I want change '/usr/lib/pg_trgm' to
'$libdir/pg_trgm' for old database. And I have only one ugly solution:
replace '/usr/lib/pg_trgm' with '$libdir//pg_trgm' in table files
(/usr/lib - 8 chars, $libdir/ - 8 chars).

May be someone has better solution?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tiffany Thang 2017-08-24 18:31:33 creating tables in tablespace
Previous Message David G. Johnston 2017-08-24 15:09:39 Re: DROP [TEMP] TABLE syntax, as reason why not?