Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 72ECD632871 for ; Tue, 6 Jul 2010 11:49:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 86620-08 for ; Tue, 6 Jul 2010 14:48:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 114A062F51F for ; Tue, 6 Jul 2010 11:48:52 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o66EmmF10095; Tue, 6 Jul 2010 10:48:48 -0400 (EDT) From: Bruce Momjian Message-Id: <201007061448.o66EmmF10095@momjian.us> Subject: Re: Change to 'timing on' globally In-Reply-To: To: Balkrishna Sharma Date: Tue, 6 Jul 2010 10:48:48 -0400 (EDT) CC: alvherre@commandprompt.com, pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/14 X-Sequence-Number: 35033 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 http://momjian.us EnterpriseDB http://enterprisedb.com + None of us is going to be here forever. +