Re: psql + autocommit - Mailing list pgsql-general

From William Yu
Subject Re: psql + autocommit
Date
Msg-id ciag95$13mg$1@news.hub.org
Whole thread Raw
In response to Re: psql + autocommit  (John Sidney-Woollett <johnsw@wardbrook.com>)
List pgsql-general
A script to do this should be trivial. This is just off the top of my head.

#!/usr/bin/perl
open(USER, "/etc/passwd");
while(<USER>) {
   @tmp = split(/:/, $_);
   $home_dir = $tmp[5];
   if ($home_dir) {
     open(PGCONF, "> $home_dir/.psqlrc");
     print PGCONF "\\set AUTOCOMMIT 'off'\n";
     close(PGCONF);
   }
}
close(USER);




John Sidney-Woollett wrote:

> Adding it to $HOME/.psqlrc worked fine, but means that I need to install
> it for each user.

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Simple getting-started guide
Next
From: Peter Eisentraut
Date:
Subject: Re: psql + autocommit