Re: "\set AUTOCOMMIT off" has affect - Mailing list pgsql-general

From Andreas Seltenreich
Subject Re: "\set AUTOCOMMIT off" has affect
Date
Msg-id andreasmzfmd9sw.fsf@gate450.dyndns.org
Whole thread Raw
In response to "\set AUTOCOMMIT off" has affect  (Axel Straschil <axel@straschil.com>)
List pgsql-general
Axel Straschil writes:

> I want to disable autocommit, my psqlrc:
>
> SET client_min_messages = 'WARNING';
> SET add_missing_from = false;
> \set AUTOCOMMIT off
>
> it has no effect:
>
> echo "show AUTOCOMMIT" | psql
> SET
> SET
>  autocommit
> ------------
>  on
> (1 row)
>
> How can I disable autocommit in psqlrc?

It is. You're just looking at the no-op GUC variable instead of the
psql one. Try

    \echo :AUTOCOMMIT

instead.

regards,
andreas
--

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: PANIC: heap_update_redo: no block
Next
From: Axel Straschil
Date:
Subject: Re: "\set AUTOCOMMIT off" has affect