Where is the system-wide psqlrc on RHEL4?

Started by Dean Gibson (DB Administrator)about 18 years ago4 messagesgeneral
Jump to latest
#1Dean Gibson (DB Administrator)
postgresql@ultimeth.com

I've tried various places, and none seem to work. I've even done a
"strings `which psql` | grep psqlrc" to no avail.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dean Gibson (DB Administrator) (#1)
Re: Where is the system-wide psqlrc on RHEL4?

"Dean Gibson (DB Administrator)" <postgresql@ultimeth.com> writes:

I've tried various places, and none seem to work. I've even done a
"strings `which psql` | grep psqlrc" to no avail.

"pg_config --sysconfdir" would tell you. I agree the documentation
on this is less than clear.

regards, tom lane

#3Dean Gibson (DB Administrator)
postgresql@ultimeth.com
In reply to: Tom Lane (#2)
Re: Where is the system-wide psqlrc on RHEL4?

-bash: pg_config: command not found

It's not installed in the base/server/libs RPMs. I had to search the
uninstalled PostgreSQL RPMs for it, and then (temporarily) install the
"devel" RPM to run it. For CentOS 4.4 & RHEL4, the system-wide psqlrc
is in /etc/sysconfig/pgsql/

-- Dean

Show quoted text

On 2008-02-09 18:45, Tom Lane wrote:

"Dean Gibson (DB Administrator)" <postgresql@ultimeth.com> writes:

I've tried various places, and none seem to work. I've even done a
"strings `which psql` | grep psqlrc" to no avail.

"pg_config --sysconfdir" would tell you. I agree the documentation
on this is less than clear.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

#4Andrej Ricnik-Bay
andrej.groups@gmail.com
In reply to: Dean Gibson (DB Administrator) (#3)
Re: Where is the system-wide psqlrc on RHEL4?

On 10/02/2008, Dean Gibson (DB Administrator) <postgresql@ultimeth.com> wrote:

It's not installed in the base/server/libs RPMs. I had to search the
uninstalled PostgreSQL RPMs for it, and then (temporarily) install the
"devel" RPM to run it. For CentOS 4.4 & RHEL4, the system-wide psqlrc
is in /etc/sysconfig/pgsql/

Another alternative (quick & dirty) would have been to
strace -o whereisit psql
and
grep psqlrc whereisit

-- Dean

Cheers,
Andrej

--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm