Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
Cc: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?
Date: 2023-02-19 02:50:47
Message-ID: CAKFQuwZ7jQpT09-6_vnhcinUSmBmo9YcoAuOO3ui7tgTjK4kFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Feb 18, 2023 at 4:49 PM Bryn Llewellyn <bryn(at)yugabyte(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Lawrence Barwick 2023-02-19 02:52:37 Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?
Previous Message Jonathan S. Katz 2023-02-19 02:20:31 Re: Support logical replication of DDLs