pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14772: psql autocommit does not work
6+ messages / 3 participants
[nested] [flat]

* BUG #14772: psql autocommit does not work
@ 2017-08-07 14:18 abo@zetescards.be
  2017-08-07 14:32 ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
  0 siblings, 1 reply; 6+ messages in thread

From: abo@zetescards.be @ 2017-08-07 14:18 UTC (permalink / raw)
  To: pgsql-bugs; +Cc: abo@zetescards.be

The following bug has been logged on the website:

Bug reference:      14772
Logged by:          Alain Bourgeois
Email address:      abo@zetescards.be
PostgreSQL version: 10beta2
Operating system:   Win x64
Description:        

D:\PostgreSQL\10beta\bin>psql -U postgres -d testdb
Mot de passe pour l'utilisateur postgres :
psql (10beta2)
Attention : l'encodage console (850) diffère de l'encodage Windows (1252).
            Les caractères 8 bits peuvent ne pas fonctionner correctement.
            Voir la section « Notes aux utilisateurs de Windows » de la
page
            référence de psql pour les détails.
Saisissez « help » pour l'aide.

testdb=# set autocommit=off;
ERREUR:  paramètre de configuration « autocommit » non reconnu
testdb=# set autocommit = off;
ERREUR:  paramètre de configuration « autocommit » non reconnu
testdb=# set autocommit to off;
ERREUR:  paramètre de configuration « autocommit » non reconnu
testdb=# set autocommit = off
testdb-# ;
ERREUR:  paramètre de configuration « autocommit » non reconnu
testdb=# SET AUTOCOMMIT=OFF;
ERREUR:  paramètre de configuration « autocommit » non reconnu
testdb=#


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


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #14772: psql autocommit does not work
  2017-08-07 14:18 BUG #14772: psql autocommit does not work abo@zetescards.be
@ 2017-08-07 14:32 ` Fabien COELHO <coelho@cri.ensmp.fr>
  2017-08-08 08:14   ` Re: BUG #14772: psql autocommit does not work alain bourgeois <a.bourgeois@zetescards.be>
  0 siblings, 1 reply; 6+ messages in thread

From: Fabien COELHO @ 2017-08-07 14:32 UTC (permalink / raw)
  To: abo@zetescards.be; +Cc: pgsql-bugs


> testdb=# set autocommit=off;
> ERREUR:  paramètre de configuration « autocommit » non reconnu

Sure, there is no "autocommit" server-side setting.

You meant the client-side setting: psql> \set AUTOCOMMIT off

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #14772: psql autocommit does not work
  2017-08-07 14:18 BUG #14772: psql autocommit does not work abo@zetescards.be
  2017-08-07 14:32 ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
@ 2017-08-08 08:14   ` alain bourgeois <a.bourgeois@zetescards.be>
  2017-08-08 13:02     ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
  0 siblings, 1 reply; 6+ messages in thread

From: alain bourgeois @ 2017-08-08 08:14 UTC (permalink / raw)
  To: Fabien COELHO <coelho@cri.ensmp.fr>; +Cc: pgsql-bugs

testdb=# \set autocommit off;
testdb=# insert into tabtest(id, texte) values (3,'test');
INSERT 0 1
testdb=# commit;
ATTENTION:  aucune transaction en cours
COMMIT

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



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@cri.ensmp.fr>
To:     abo@zetescards.be
Cc:     PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Date:   07-08-17 16:32
Subject:        Re: [BUGS] BUG #14772: psql autocommit does not work




> testdb=# set autocommit=off;
> ERREUR:  paramètre de configuration « autocommit » non reconnu

Sure, there is no "autocommit" server-side setting.

You meant the client-side setting: psql> \set AUTOCOMMIT off

-- 
Fabien.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #14772: psql autocommit does not work
  2017-08-07 14:18 BUG #14772: psql autocommit does not work abo@zetescards.be
  2017-08-07 14:32 ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
  2017-08-08 08:14   ` Re: BUG #14772: psql autocommit does not work alain bourgeois <a.bourgeois@zetescards.be>
@ 2017-08-08 13:02     ` Fabien COELHO <coelho@cri.ensmp.fr>
  2017-08-08 13:23       ` Re: BUG #14772: psql autocommit does not work alain bourgeois <a.bourgeois@zetescards.be>
  0 siblings, 1 reply; 6+ messages in thread

From: Fabien COELHO @ 2017-08-08 13:02 UTC (permalink / raw)
  To: alain bourgeois <a.bourgeois@zetescards.be>; +Cc: pgsql-bugs


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.


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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #14772: psql autocommit does not work
  2017-08-07 14:18 BUG #14772: psql autocommit does not work abo@zetescards.be
  2017-08-07 14:32 ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
  2017-08-08 08:14   ` Re: BUG #14772: psql autocommit does not work alain bourgeois <a.bourgeois@zetescards.be>
  2017-08-08 13:02     ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
@ 2017-08-08 13:23       ` alain bourgeois <a.bourgeois@zetescards.be>
  2017-08-08 16:32         ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
  0 siblings, 1 reply; 6+ messages in thread

From: alain bourgeois @ 2017-08-08 13:23 UTC (permalink / raw)
  To: Fabien COELHO <coelho@cri.ensmp.fr>; +Cc: 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@cri.ensmp.fr>
To:     alain bourgeois <a.bourgeois@zetescards.be>
Cc:     abo@zetescards.be, PostgreSQL Bugs List 
<pgsql-bugs@postgresql.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.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #14772: psql autocommit does not work
  2017-08-07 14:18 BUG #14772: psql autocommit does not work abo@zetescards.be
  2017-08-07 14:32 ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
  2017-08-08 08:14   ` Re: BUG #14772: psql autocommit does not work alain bourgeois <a.bourgeois@zetescards.be>
  2017-08-08 13:02     ` Re: BUG #14772: psql autocommit does not work Fabien COELHO <coelho@cri.ensmp.fr>
  2017-08-08 13:23       ` Re: BUG #14772: psql autocommit does not work alain bourgeois <a.bourgeois@zetescards.be>
@ 2017-08-08 16:32         ` Fabien COELHO <coelho@cri.ensmp.fr>
  0 siblings, 0 replies; 6+ messages in thread

From: Fabien COELHO @ 2017-08-08 16:32 UTC (permalink / raw)
  To: alain bourgeois <a.bourgeois@zetescards.be>; +Cc: pgsql-bugs


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

Yes, it is pretty strange.

The backslash command are outside of SQL and finished on the line. You can 
use them anywhere:

   psql> SELECT
          \set x 2
          1
          \set y 3
          ;
   # 1
   psql> \echo :x :y
   # 2 3

Basically SQL & backslash commands are unrelated. The SQL is sent to the 
server, the backslash is executed on the client...

-- 
Fabien.


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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2017-08-08 16:32 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-08-07 14:18 BUG #14772: psql autocommit does not work abo@zetescards.be
2017-08-07 14:32 ` Fabien COELHO <coelho@cri.ensmp.fr>
2017-08-08 08:14   ` alain bourgeois <a.bourgeois@zetescards.be>
2017-08-08 13:02     ` Fabien COELHO <coelho@cri.ensmp.fr>
2017-08-08 13:23       ` alain bourgeois <a.bourgeois@zetescards.be>
2017-08-08 16:32         ` Fabien COELHO <coelho@cri.ensmp.fr>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox