Re: How to find out extension directory

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: rakeshkumar464 <rakeshkumar464(at)outlook(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to find out extension directory
Date: 2017-10-20 21:16:23
Message-ID: d175808a-b133-08d0-f17d-3ff2520ab1d7@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/20/2017 02:10 PM, Tom Lane wrote:
> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
>> On Fri, Oct 20, 2017 at 1:12 PM, rakeshkumar464 <rakeshkumar464(at)outlook(dot)com>
>> wrote:
>>> How do I know beforehand where the dir path is ?
>
>> I think pg_config (
>> https://www.postgresql.org/docs/current/static/app-pgconfig.html ) is what
>> you are looking for.
>
> specifically, you can assume it's the "extension" subdirectory of
> whatever SHAREDIR is. "pg_config --sharedir" will tell you that.

And starting with pg 9.6 you can also do:

test=# select * from pg_config where name = 'SHAREDIR';
name | setting
----------+--------------------------------------
SHAREDIR | /usr/local/pgsql-REL_10_STABLE/share
(1 row)

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Israel Brewster 2017-10-20 23:08:26 Weird performance difference
Previous Message Tom Lane 2017-10-20 21:10:41 Re: How to find out extension directory