Re: Rearranging ALTER TABLE to avoid multi-operations bugs

Поиск
Список
Период
Сортировка
От movead li
Тема Re: Rearranging ALTER TABLE to avoid multi-operations bugs
Дата
Msg-id 156041479952.1280.2626916806999463144.pgcf@coridan.postgresql.org
обсуждение исходный текст
Ответ на Re: Rearranging ALTER TABLE to avoid multi-operations bugs  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Rearranging ALTER TABLE to avoid multi-operations bugs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I applied the 'alter-table-with-recursive-process-utility-calls-wip.patch'
on the master(e788e849addd56007a0e75f3b5514f294a0f3bca). And 
when I test the cases, I find it works well on 'alter table t1 add column
f2 int not null, alter column f2 add generated always as identity' case, 
but it doesn't work on #14827, #15180, #15670, #15710.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is the test result with #14827 failed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgres=# create table t10 (f1 int);
CREATE TABLE
postgres=# alter table t10 add column f2 int not null,
postgres-# alter column f2 add generated always as identity;
ALTER TABLE
postgres=# 
postgres=# insert into t10 values(0);
INSERT 0 1
postgres=# create table test_serial ( teststring varchar(5));
CREATE TABLE
postgres=# alter table test_serial add column if not exists uid BIGSERIAL;
ALTER TABLE
postgres=# alter table test_serial add column if not exists uid BIGSERIAL;
psql: NOTICE:  column "uid" of relation "test_serial" already exists, skipping
ALTER TABLE
postgres=# 
postgres=# \d
                    List of relations
 Schema |         Name         |   Type   |    Owner     
--------+----------------------+----------+--------------
 public | t10                  | table    | lichuancheng
 public | t10_f2_seq           | sequence | lichuancheng
 public | test_serial          | table    | lichuancheng
 public | test_serial_uid_seq  | sequence | lichuancheng
 public | test_serial_uid_seq1 | sequence | lichuancheng
(5 rows)

postgres=#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So it's wrong with a 'test_serial_uid_seq1' sequence to appear.

The new status of this patch is: Waiting on Author

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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Backend specific ifdefs in sha2.h
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: BEFORE UPDATE trigger on postgres_fdw table not work