Re: BUG #14772: psql autocommit does not work

From: "alain bourgeois" <a(dot)bourgeois(at)zetescards(dot)be>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: abo(at)zetescards(dot)be,PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14772: psql autocommit does not work
Date: 2017-08-08 13:23:00
Message-ID: OF7E3F8105.BE9A375E-ONC1258176.0049767B-C1258176.004984A3@LocalDomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

also, the semicolumn, needed for some statementds (sql) but not all.

Alain Bourgeois
Software Engineer
Tel: +32 (0)2 333 49 20
Mobile: +32 (0)496 51 85 75
skype: abozetes
ZETES PASS, division of ZETES SA/NV
Disclaimer : This e-mail may contain material that is confidential and
privileged for the sole use of the intended recipient. Any review,
reliance or distribution by others or forwarding without express
permission is strictly prohibited and may be unlawful. If you receive this
message in error, please contact the sender and delete the material from
any computer.

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: alain bourgeois <a(dot)bourgeois(at)zetescards(dot)be>
Cc: abo(at)zetescards(dot)be, PostgreSQL Bugs List
<pgsql-bugs(at)postgresql(dot)org>
Date: 08-08-17 15:02
Subject: Re: [BUGS] BUG #14772: psql autocommit does not work

Hello Alain,

> testdb=# \set autocommit off;

Hmmm.

The special variable name is "AUTOCOMMIT", and you are creating an
unrelated "autocommit" lower case variable instead. Client-side variable
names are case sensitive. Maybe that was not a good idea, especially given

than SQL is case insensitive, but it is probably too late to change
that...

With the right name you would get a clear error message.

psql> \set AUTOCOMMIT off;
unrecognized value "off;" for "AUTOCOMMIT": boolean expected

I'm not sure what to do. Maybe generate a warning if a special variable
name is used uncapitalized...

> OK I found : \set AUTOCOMMIT false
> (without any semicolumn)

Yep.

--
Fabien.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Fabien COELHO 2017-08-08 16:32:15 Re: BUG #14772: psql autocommit does not work
Previous Message Fabien COELHO 2017-08-08 13:02:05 Re: BUG #14772: psql autocommit does not work