Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xm08n-0000VO-Sj for pgsql-admin@arkaria.postgresql.org; Wed, 05 Nov 2014 12:56:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xm08n-0007KA-DK for pgsql-admin@arkaria.postgresql.org; Wed, 05 Nov 2014 12:56:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xm08m-0007Jf-7k for pgsql-admin@postgresql.org; Wed, 05 Nov 2014 12:56:48 +0000 Received: from nm40-vm4.bullet.mail.ir2.yahoo.com ([212.82.97.172]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xm08h-00006l-8X for pgsql-admin@postgresql.org; Wed, 05 Nov 2014 12:56:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1415192197; bh=krteZxl3NEq1pQwb059B7DBaN0XAVadFFHyAHlnuNsE=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=jA7+fOydrepwHcCVdM06YeyYMn24LvPMO4Aibwxl507uK5zUP2sZpt0RKcyga7oJTCLkU96CqO6C9vNjBzCzVzYkgOL+11TTqGmVynMLb+Cj73CIF8d3ZE5QZcBmeX2av0jX/qay6NFL5DLyXrnbWjI1gwYQyQKydBlYxdfJCdqvsp6WXlKbXkV2ixX4evW+twD3v0XVtSAgcG95u7OpCx5cRdanwtN9JfQys/lHOMgLFtdrDnsfhM6yeQvjLRAyihcZ3TbfX1oN/1ZLj0YMuSz5DMh7YgN5G4oeD+2Ss0FLFwdLD3JnNVbmLplao5IvywZw+6aNHbcuIxsxH/Y/Lw== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.de; b=JTCO9qLRDat1ax5J4ymE3RzXSS0aoU78x/PoF6/JvhTqErY2icpuYdkz3VRxTXv4piuYFZ/F1DWFgQ3XrF0bBj6/LyGQ8UyzIwx/HYced92bvgOL+Yoimk9EWU4RelxzMb4eBLYJmbrk1lK5m0CYZ9j4nkB/Co8D7hwvDXlb+PoMBvkaYipe6stjusRAOG9xxS8TAxVy9tdiboOQEfbflFQayc0NBL1T8SSr2/KBgqrGqlbGx4EwjBI6gi/Czo8FeSG+hY6Ri++/P9nl6MecnwLpFj0APD3yPhsOp0bJUnNcuxfjzDCffRaaf6B8TVo2vmPKngFT/b8UkZ9KvFXyLw==; Received: from [212.82.98.57] by nm40.bullet.mail.ir2.yahoo.com with NNFMP; 05 Nov 2014 12:56:37 -0000 Received: from [212.82.98.79] by tm10.bullet.mail.ir2.yahoo.com with NNFMP; 05 Nov 2014 12:56:36 -0000 Received: from [127.0.0.1] by omp1016.mail.ir2.yahoo.com with NNFMP; 05 Nov 2014 12:56:36 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 500626.8914.bm@omp1016.mail.ir2.yahoo.com X-YMail-OSG: JojakQ4VM1lrv4OhWSVBhB9b8hMsDn1OGhGx3YS9bMe6j_JN4hcE4193tTr29UW _B1wT2wfZ3l1s0XixICsSwxP7B06IZ25yGiulHPvoJt0ObICaMe42V6d.oaEudrXFr_pMFZgfw5k tg0XLc2fUuEPar1nJv_3iVIy.S4eT3U0Pf.h2_bPvAnl9CmSvTjkUo0jdVNxGpLz2W85eFxwe5yV 120iMZ6iG8F5ZzWgKs.uOmrmcrIBKelvAiY2f55rV_buLeTts4ZsH7zpZZjzBgEQSzWP6UhKWBfS b0h3kTq5KNKt5F_PEzY5Drmh6Ow5C5yVfsDKbSCdXgoeqHIfg1kY9i.Ux5lPEbLNFCYEchpxECZx Ma2zxnfDD7EljfUf6MD_VXonDw0JPrOJ3zYHL27bggGDFT24_qwIF33LDUVhgr0gg0lXKB.G5Zcb JG3MA5tOx4aiTDGDo2jAZCDie4P066EWx2mUEe.y1IQlDd6q0AUQmHPk72sV3tV2MTc75T5kyKyY wJiwm0t5BWA-- Received: by 217.12.9.15; Wed, 05 Nov 2014 12:56:36 +0000 Date: Wed, 5 Nov 2014 12:56:35 +0000 (UTC) From: Wolfgang Wilhelm Reply-To: Wolfgang Wilhelm To: Albe Laurenz , Thomas Kellerer , "pgsql-admin@postgresql.org" Message-ID: <1725993116.882216.1415192195154.JavaMail.yahoo@jws11144.mail.ir2.yahoo.com> In-Reply-To: References: Subject: Re: Autocommit off in psql MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_882215_1687287646.1415192195150" Content-Length: 9530 X-Pg-Spam-Score: -1.5 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org ------=_Part_882215_1687287646.1415192195150 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello Laurenz, yes, indeed I'm a little confused. I'm not the only one, some Pg-Guys from = other companies which I asked about the topic were a little bit puzzled, to= o. If this is really a left over and just for portablity when will be time for= a clean up? May be not for the next years' version - there should be in go= od PG manner just an information that this feature is deprecated, if the Ha= ckers agree - but may be for the PG-version of 2017 or 2018? As you as a contributor are more included in the development of PG code, do= you see chances to get that out of the code? If so I'm willing to have a l= ook in the code whether there are comments about that feature. YoursWolfgang Albe Laurenz schrieb am 11:57 Mittwoch, 5.No= vember 2014: =20 Wolfgang Wilhelm wrote: > Thomas Kellerer schrieb am 9:25 Mittwoch, 5.November= 2014: >>> Is there any way to make psql work a little bit more like sqlplus? >>> "Set autocommit off" is obviously no solution as it's not valid >>> anymore. >> You can use >>=20 >>=C2=A0 \set AUTOCOMMIT off >>=20 >> in psql to turn off autocommit mode (note that this is case-sensitive!)>= first of all thank you for your answer. > This is basically what I found via Google, too, but is that up to date in= formation? I found some more > info that that setting isn't valid anymore. >=20 > When I do that command which you sent, it seems to execute but when I do >=20 >=20 > show AUTOCOMMIT; >=20 >=20 > I get as as a result: >=20 >=C2=A0 autocommit > ------------ >=C2=A0 on >=20 > (1 line) >=20 > When I do the command which you mentioned with a semicolon at the end I g= et an error message: Unknow > boolean value: "on" assumed - well, at least I guess it should be somethi= ng like that because I get > that in german. >=20 > I tried with several other boolean values like 0, false, none, all with t= he same result of show > AUTOCOMMIT; >=20 > Just a minute ago I realized that the output of show AUTOCOMMIT is someho= w, well, misleading. First I > did setting autocommit off. Then I inserted some data in a table. Another= insert, a third. If > autocommit would be on I'd expect it to do a commit after every insert. B= ut a rollback made them all > three disappear. I found that in the help text of the show command AUTOCO= MMIT is not included. The > question is why show outputs some info. But that shouldn't be your proble= m. The autocommit parameter you see with SHOW is a leftover of the removed ser= ver feature. It is there for compatibility reasons (I guess) but is read-only: test=3D> SET autocommit=3Doff; ERROR:=C2=A0 SET AUTOCOMMIT TO OFF is no longer supported You are getting confused because this is a server-side setting (and indeed,= there is no way to turn autocommit off on the server side), whereas \set AUTOCOMMIT is a cl= ient side feature. The latter works by automatically inserting a BEGIN at the appropriate time= ; nothing changes on the server side. Yours, Laurenz Albe --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin ------=_Part_882215_1687287646.1415192195150 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello Laurenz,

yes, indeed I'm a little confused. I'= m not the only one, some Pg-Guys from other companies which I asked about t= he topic were a little bit puzzled, too.
If this is really a left over and just for p= ortablity when will be time for a clean up? May be not for the next years' = version - there should be in good PG manner just an information that this f= eature is deprecated, if the Hackers agree - but may be for the PG-version = of 2017 or 2018?

<= span>
As you as a = contributor are more included in the development of PG code, do you see cha= nces to get that out of the code? If so I'm willing to have a look in the = code whether there are comments about that feature.

Yours
Wolfgang


Albe Laurenz <laurenz.al= be@wien.gv.at> schrieb am 11:57 Mittwoch, 5.November 2014:
<= /div>

Wolfgang Wilhelm wrote:
> Thomas Kellerer <spam_eater@gmx.net> schrieb am 9:25 Mittwoch, 5.November 2014:
>>= ;> Is there any way to make psql work a little bit more like sqlplus?>>> "Set autocommit off" is obviously no solution = as it's not valid
>>> anymore.

>> You can use
>>
>>  \set AUTOCOMMIT off
>> =
>> in psql to turn off autocommit mode (note that = this is case-sensitive!)> first of all thank you for your answer.

> This is basically what I found via Goog= le, too, but is that up to date information? I found some more
> info that that setting isn't valid anymore.
&g= t;
> When I do that command which you sent, it seems = to execute but when I do
>
> > show AUTOCOMMIT;
>
>
> I get as as a result:
&= gt;
>  autocommit
> -------= -----
>  on
>
> (1 line)
>
> When I do= the command which you mentioned with a semicolon at the end I get an error= message: Unknow
> boolean value: "on" assumed - well,= at least I guess it should be something like that because I get
> that in german.
>
&g= t; I tried with several other boolean values like 0, false, none, all with = the same result of show
> AUTOCOMMIT;
>
> Just a minute ago I realized that the output= of show AUTOCOMMIT is somehow, well, misleading. First I
> did setting autocommit off. Then I inserted some data in a table. Ano= ther insert, a third. If
> autocommit would be on I'd = expect it to do a commit after every insert. But a rollback made them all> three disappear. I found that in the help text of the= show command AUTOCOMMIT is not included. The
> questi= on is why show outputs some info. But that shouldn't be your problem.

The autocommit parameter you see with SHOW = is a leftover of the removed server feature.
It is there = for compatibility reasons (I guess) but is read-only:
test=3D> SET autocommit=3Doff;
ERROR:&= nbsp; SET AUTOCOMMIT TO OFF is no longer supported

You are getting confused because this is a server-side setting= (and indeed, there is no way
to turn autocommit off on t= he server side), whereas \set AUTOCOMMIT is a client side feature.
The latter works by automatically inserting a BEGIN at the approp= riate time; nothing
changes on the server side.

Yours,
Laurenz Albe


------=_Part_882215_1687287646.1415192195150--