Re: PGSYSCONFDIR? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: PGSYSCONFDIR?
Date
Msg-id 20140114191004.GJ6840@eldon.alvh.no-ip.org
Whole thread Raw
In response to PGSYSCONFDIR?  (John Sutton <johnericsutton@gmail.com>)
List pgsql-general
John Sutton escribió:

> As a last resort (which surely shouldn’t be necessary) on the Ubuntu system I did:
>
> strings /usr/bin/psql | grep -i sysconf
>
> $ENV{'PGSYSCONFDIR'} = '/etc/postgresql-common' if !$ENV{'PGSYSCONFDIR’};
>
> So that’s where it needs to be: /etc/postgresql-common/psqlrc

Meh.  /usr/bin/psql in Debian/Ubuntu is a shell script provided by the
packaging.

> I’ve still no clue for Mac OS X however, since the same trick only finds a placeholder :( :
>
> strings /Applications/Postgres.app/Contents/MacOS/bin/psql | grep -i sysconf
>
> PGSYSCONFDIR
> PGSYSCONFDIR=%s

This is probably what you would get if you had stringied the binary in
Debian/Ubuntu, too, instead of the wrapper script.

I think the way to get the PGSYSCONFDIR would be to use
  pg_config --sysconfdir

If you don't have pg_config, ...  Tough.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-general by date:

Previous
From: John Sutton
Date:
Subject: PGSYSCONFDIR?
Next
From: Tom Lane
Date:
Subject: Re: PGSYSCONFDIR?