Stored generated columns are NULL in transition tables of partitioned tables

Поиск
Список
Период
Сортировка
Искать

Stored generated columns are NULL in transition tables of partitioned tables

От:
shihao zhong <zhong950419@gmail.com>
Дата:
Вложения:
Hi hackers,

If a partition needs tuple conversion, the NEW TABLE of an AFTER trigger
on the parent shows NULL for stored generated columns.

  create table t (a int, junk int, b int,
                  g int generated always as (b * 2) stored)
    partition by range (a);
  alter table t drop column junk;
  create table t1 partition of t for values from (0) to (100);
  create trigger tr after insert on t referencing new table as n
    for each statement execute function show_n();
  copy t (a, b) from stdin;
  1 10
  \.

0001 fixes it and 0002 adds a test. This affects 14 to 19. 

003 is for master only. It passes the original tuple again in ExecInsert(), which
398eb35f001 stopped doing.

Thanks,
Shihao
FAQ