Balkrishna Sharma wrote:
> 
> Thanks. If I want to do at system-wide level, where do I store the
> psqlrc file (assuming I want to change the timing behavior system-wide)?

> (CentOS 5, Postgres 8.4)
> $ ./pg_config --sysconfdir/opt/PostgreSQL/8.4/etc/postgresql

> But I don't have /opt/PostgreSQL/8.4/etc/postgresql directory. Just
> creating the directory and putting a psqlrc file over there does not
> seem to work.

I just tested it here on Ubuntu and it worked:

        $ sudo mkdir etc
        $ sudo mkdir etc/postgresql
        $ cd etc/postgresql/
        $ sudo vi psqlrc
        # add \echo test
        $ pwd
        /opt/PostgreSQL/8.4/etc/postgresql
        $ ../../bin/psql -U postgres postgres
-->     test
        psql (8.4.2)
        Type "help" for help.
        
        postgres=# 

> On a side-note, I observered that timing value in ~/.psqlrc was
> ignored by psql -c "..." command but not by echo "...."|psqlThought
> it was strange.

Yeah, that is odd.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + None of us is going to be here forever. +

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

Reply via email to