From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Robert Treat <rob(at)xzilla(dot)net>, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: New docs chapter on Transaction Management and related changes |
Date: | 2022-11-22 18:05:56 |
Message-ID: | Y30PhK8aiSPqyAQL@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 21, 2022 at 11:35:09AM +0100, Álvaro Herrera wrote:
> Agreed on not using "unaborted", per previous discussion.
>
> On 2022-Nov-21, Laurenz Albe wrote:
>
> > Perhaps we should also avoid the term "transaction block". Even without speaking
> > of a "block", way too many people confuse PL/pgSQL's BEGIN ... END blocks
> > with transactions. On the other hand, we use "transaction block" everywhere
> > else in the documentation...
>
> Yeah, I don't understand why we need this "transaction block" term at
> all. It adds nothing. We could just use the term "transaction", and
> little meaning would be lost. When necessary, we could just say
> "explicit transaction" or something to that effect. In this particular
> case, we could modify your proposed wording,
Yes, I just posted that same thing:
Transactions can be created explicitly using
> > <para>
> > Multi-statement transactions can be created explicitly using
> > <command>BEGIN</command> or <command>START TRANSACTION</command> and
> > are ended using <command>COMMIT</command> or <command>ROLLBACK</command>.
> > An SQL statement outside of a transaction block automatically uses
> > a single-statement transaction.
> > </para>
>
> by removing the word "block":
>
> > Any SQL statement outside of an transaction automatically uses
> > a single-statement transaction.
>
> and perhaps add "explicit", but I don't think it's necessary:
>
> > Any SQL statement outside of an explicit transaction automatically
> > uses a single-statement transaction.
Full paragraph is now:
Transactions can be created explicitly using <command>BEGIN</command>
or <command>START TRANSACTION</command> and ended using
<command>COMMIT</command> or <command>ROLLBACK</command>. An SQL
statement outside of an explicit transaction automatically uses a
single-statement transaction.
> (I also changed "An" to "Any" because it seems more natural, but I
> suppose it's a stylistic choice.)
I think we have a plurality mismatch so I went with "SQL statements" and
didn't need "an" or "any" (even newer paragraph version):
Transactions can be created explicitly using <command>BEGIN</command>
or <command>START TRANSACTION</command> and ended using
<command>COMMIT</command> or <command>ROLLBACK</command>. SQL
statements outside of explicit transactions automatically use
single-statement transactions.
Updated patch attached.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Indecision is a decision. Inaction is an action. Mark Batterson
Attachment | Content-Type | Size |
---|---|---|
xact.diff | text/x-diff | 24.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2022-11-22 18:22:31 | Re: Damage control for planner's get_actual_variable_endpoint() runaway |
Previous Message | Magnus Hagander | 2022-11-22 18:04:43 | Re: More efficient build farm animal wakeup? |