Re: BUG #16870: ADD COLUMN IF NOT EXISTS with GENERATED ALWAYS AS IDENTITY can cause duplicate sequence

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16870: ADD COLUMN IF NOT EXISTS with GENERATED ALWAYS AS IDENTITY can cause duplicate sequence
Дата
Msg-id 2536806.1613576789@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16870: ADD COLUMN IF NOT EXISTS with GENERATED ALWAYS AS IDENTITY can cause duplicate sequence  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> Hello, I'm getting unexpected behaviour with IDENTITY columns when running
> ALTER TABLE ADD COLUMN IF NOT EXISTS on them when they already exist.

Yeah, this is a known issue: the IF NOT EXISTS operates to skip the
actual creation of the column, but it fails to suppress secondary
operations such as adding indexes or serial sequences.  It's fixed
in v13, but the changes were too major to consider back-patching.

            regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16871: Insert with wrong key field, causing later crash of DB.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16871: Insert with wrong key field, causing later crash of DB.