Re: BUG #16805: "ALTER TABLE ... ADD COLUMN IF NOT EXISTS ... PRIMARY KEY" fails if column exists and is the primary

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16805: "ALTER TABLE ... ADD COLUMN IF NOT EXISTS ... PRIMARY KEY" fails if column exists and is the primary
Дата
Msg-id 3379436.1609861502@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16805: "ALTER TABLE ... ADD COLUMN IF NOT EXISTS ... PRIMARY KEY" fails if column exists and is the primary  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> ALTER TABLE IF EXIST foo ADD COLUMN IF NOT EXISTS id BIGSERIAL PRIMARY KEY;
> Fails if "id" exists and is already the primary key.

Yeah, known problem.  This is fixed in v13, but the fix seemed too
invasive for a back-patch (see [1] and follow-on fixes).

            regards, tom lane

[1] https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=1281a5c90



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

Предыдущее
От: Hamid Akhtar
Дата:
Сообщение: Re: BUG #16805: "ALTER TABLE ... ADD COLUMN IF NOT EXISTS ... PRIMARY KEY" fails if column exists and is the primary
Следующее
От: Tom Lane
Дата:
Сообщение: Re: compiling error on OpenWrt