pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedALTER TABLE atomicity with sub-commands
2+ messages / 2 participants
[nested] [flat]
* ALTER TABLE atomicity with sub-commands
@ 2024-04-02 14:40 PG Doc comments form <noreply@postgresql.org>
2024-04-02 21:11 ` Re: ALTER TABLE atomicity with sub-commands Erik Wienhold <ewie@ewie.name>
0 siblings, 1 reply; 2+ messages in thread
From: PG Doc comments form @ 2024-04-02 14:40 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: t@gobet.ar
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/sql-altertable.html
Description:
Hello dear PostgreSQL family,
It is not entirely clear (to me) that ALTER TABLE statements with
comma-separated sub-commands are atomic. Despite of saying "perform X
actions in one operation" in one of the examples, it is not explicitly said
that the operation will be rolled back if one of the sub-commands fails.
From the examples, we have:
ALTER TABLE distributors
ALTER COLUMN address TYPE varchar(80),
ALTER COLUMN name TYPE varchar(100);
Will the `address` column type change rollback if the `ALTER COLUMN name
TYPE varchar(100)` subcommand fails?
Currently reading the docs for version 15.
Many thanks :)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ALTER TABLE atomicity with sub-commands
2024-04-02 14:40 ALTER TABLE atomicity with sub-commands PG Doc comments form <noreply@postgresql.org>
@ 2024-04-02 21:11 ` Erik Wienhold <ewie@ewie.name>
0 siblings, 0 replies; 2+ messages in thread
From: Erik Wienhold @ 2024-04-02 21:11 UTC (permalink / raw)
To: t@gobet.ar; pgsql-docs@lists.postgresql.org
On 2024-04-02 16:40 +0200, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/15/sql-altertable.html
> Description:
>
> It is not entirely clear (to me) that ALTER TABLE statements with
> comma-separated sub-commands are atomic. Despite of saying "perform X
> actions in one operation" in one of the examples, it is not explicitly said
> that the operation will be rolled back if one of the sub-commands fails.
>
> From the examples, we have:
>
> ALTER TABLE distributors
> ALTER COLUMN address TYPE varchar(80),
> ALTER COLUMN name TYPE varchar(100);
>
> Will the `address` column type change rollback if the `ALTER COLUMN name
> TYPE varchar(100)` subcommand fails?
>
> Currently reading the docs for version 15.
Yes, ALTER TABLE, like all statements, is one atomic change.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-04-02 21:11 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 14:40 ALTER TABLE atomicity with sub-commands PG Doc comments form <noreply@postgresql.org>
2024-04-02 21:11 ` Erik Wienhold <ewie@ewie.name>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox