Detect bin directory

Started by Tiziano Valdemarinover 12 years ago2 messagesgeneral
Jump to latest
#1Tiziano Valdemarin
tizianovaldemarin@gmail.com

Hi, i deploy one windows application which uses pg and since i have hundred
of customers i wrote an updater (updates are mainly monthly). The updater
manage pg upgrades too through uninstall and reinstall if there are major
server updates to do.

This process needs backup and restore and i recently started to do it using
pg_dump and pg_restore instead of copyin and copyout.

Since these are windows installation and since i plan to port my app to mac
and linux locating these executables is important for me and i'd like a
simple way to query pg for its bin path.

I know the data directory path can be found in pg_settings, but what about
bin? Is its path stored anywhere?

I already googled the topic but found only negative answers. Is there any
motive to not expose this information as for the data dir?

Thanks in advance
Tiziano

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tiziano Valdemarin (#1)
Re: Detect bin directory

Tiziano Valdemarin <tizianovaldemarin@gmail.com> writes:

I know the data directory path can be found in pg_settings, but what about
bin? Is its path stored anywhere?

It's intentionally not stored anywhere, but rather identified at runtime.

I already googled the topic but found only negative answers. Is there any
motive to not expose this information as for the data dir?

If you mean making it visible at SQL level, security might be a reason.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general