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

Attachment: v1-0002-Test-stored-generated-columns-in-transition-tables-o.patch
Description: Binary data

Attachment: v1-0001-Fix-stored-generated-columns-in-transition-tables-of.patch
Description: Binary data

Attachment: v1-0003-Pass-the-original-tuple-to-AFTER-ROW-triggers-in-Exe.patch
Description: Binary data

Reply via email to