On 10/20/2017 02:10 PM, Tom Lane wrote: > "David G. Johnston" <david.g.johns...@gmail.com> writes: >> On Fri, Oct 20, 2017 at 1:12 PM, rakeshkumar464 <rakeshkumar...@outlook.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
signature.asc
Description: OpenPGP digital signature