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


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

Reply via email to