pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: t@gobet.ar
Subject: ALTER TABLE atomicity with sub-commands
Date: Tue, 02 Apr 2024 14:40:24 +0000
Message-ID: <171206882423.679.7317080738034337679@wrigleys.postgresql.org> (raw)

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 :)


view thread (2+ messages)  latest in thread

Message-ID: <171206882423.679.7317080738034337679@wrigleys.postgresql.org>
Permalink:  ../171206882423.679.7317080738034337679@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/171206882423.679.7317080738034337679@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, t@gobet.ar
  Subject: Re: ALTER TABLE atomicity with sub-commands
  In-Reply-To: <171206882423.679.7317080738034337679@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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