Re: psql + autocommit

From: William Yu <wyu(at)talisys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: psql + autocommit
Date: 2004-09-15 22:40:51
Message-ID: ciag95$13mg$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2004-09-15 23:01:31 Simple getting-started guide
Previous Message Alvaro Herrera 2004-09-15 22:18:18 Re: psql + autocommit