Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode? - Mailing list pgsql-general

From David G. Johnston
Subject Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?
Date
Msg-id CAKFQuwZ7jQpT09-6_vnhcinUSmBmo9YcoAuOO3ui7tgTjK4kFQ@mail.gmail.com
Whole thread Raw
In response to Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?  (Bryn Llewellyn <bryn@yugabyte.com>)
Responses Thanks! Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?  (Bryn Llewellyn <bryn@yugabyte.com>)
List pgsql-general
On Sat, Feb 18, 2023 at 4:49 PM Bryn Llewellyn <bryn@yugabyte.com> wrote:

And that the mode is a property of the current session.

To rephrase the other responses, the client-defined setting has no inherent relationship to the concept of a PostgreSQL session.  How the client uses that setting is internal to the client and whatever abstraction(s) it provides the programmer.

So far as the server is concerned it is always auto (implicit) begin, and also auto (implicit) commit - absent receiving a BEGIN SQL Command in which case it disables implicit commit and (more or less) waits for a COMMIT or ROLLBACK before ending the transaction that it implicitly started.

David J.

pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?
Next
From: Ian Lawrence Barwick
Date:
Subject: Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?