From: | Holger Jakobs <holger(at)jakobs(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: set autocommit only for select statements |
Date: | 2022-04-12 06:31:15 |
Message-ID: | 6bfd5d91-bb06-1b56-f4f8-cc8f90307a35@jakobs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Am 12.04.22 um 03:53 schrieb Mladen Gogala:
>
> The "autocommit" is a tool option which tells the tool whether to add
> "COMMIT" statement after each and every SQL. The RDBMS server only
> knows about transactions, as mandated by the ACID compliance. What the
> "autocommit" option of tools like psql actually does is to turn each
> of your SQL statements into a separate transaction.
>
What you write about psql sending a COMMIT statement after each
statement is wrong. It may be true for other database systems.
PostgreSQL as a server commits each statement automatically unless the
client has started a transaction with BEGIN or START TRANSACTION statements.
This can be proved easily by not using psql as a client, but some
programming language.
Regards,
Holger
-- Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
From | Date | Subject | |
---|---|---|---|
Next Message | Michel SALAIS | 2022-04-12 09:01:13 | RE: set autocommit only for select statements |
Previous Message | Yogesh Mahajan | 2022-04-12 04:11:14 | Re: pgAdmin Docker container: specify web URL path prefix? |