Re: Change to 'timing on' globally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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  <bruce@xxxxxxxxxx>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux