Built in function question
Does anyone know if there is a function that can return the path to the
data directory?
I was looking through the docs, but could not find anything.
Thanks,
--
Tony Caduto
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql 8.x
Tony Caduto <tony_caduto@amsoftwaredesign.com> writes:
Does anyone know if there is a function that can return the path to the
data directory?
In 8.0 and later,
SHOW data_directory;
or the equivalent function call.
regards, tom lane
I found it in the pg_settings view, but if there is another way I would
like to know about it.
Thanks,
Tony
Tony Caduto wrote:
Does anyone know if there is a function that can return the path to
the data directory?I was looking through the docs, but could not find anything.
Thanks,
--
Tony Caduto
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql 8.x
Tony Caduto wrote:
[question about finding data directory]
I found it in the pg_settings view, but if there is another way I would
like to know about it.
As Tom aluded, you can also do this:
regression=# select current_setting('data_directory');
current_setting
---------------------------
/usr/local/pgsql-8.0/data
(1 row)
Joe