ALTER TABLE atomicity with sub-commands

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема ALTER TABLE atomicity with sub-commands
Дата
Msg-id 171206882423.679.7317080738034337679@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: ALTER TABLE atomicity with sub-commands  (Erik Wienhold <ewie@ewie.name>)
Список pgsql-docs
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 :)

В списке pgsql-docs по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: CREATE ROLE inheritance details
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: ALTER TABLE atomicity with sub-commands