You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit fixes a bug that was caused by prematurely re-synthesizing
computed columns after building a `BEFORE` trigger.
Fixes#154672
Release note (bug fix): A bug has been fixed that caused internal errors
for `INSERT .. ON CONFLICT .. DO UPDATE` statements when the target
table had both a computed column and a `BEFORE` trigger. This bug has
been present since triggers were introduced in v24.3.0.
│ │ │ │ ├── ((k:9, 3, CAST(NULL AS INT8)) AS k, a, b) [as=new:34]
1345
+
│ │ │ │ ├── ((k:9, a:10, CAST(NULL AS INT8)) AS k, a, b) [as=old:33]
1346
+
│ │ │ │ ├── 4 [as=b_comp:32]
1347
+
│ │ │ │ ├── 3 [as=a_new:31]
1348
+
│ │ │ │ ├── (f154672:28).k [as=k_new:29]
1349
+
│ │ │ │ └── (f154672:28).a [as=a_new:30]
1350
+
│ │ │ └── projections
1351
+
│ │ │ └── CASE WHEN k:9 IS NOT NULL THEN f154672(new:34, old:33, 'tr154672', 'BEFORE', 'ROW', 'UPDATE', 61, 't154672', 't154672', 'public', 0, ARRAY[]) ELSE new:34 END [as=f154672:35]
1352
+
│ │ └── filters
1353
+
│ │ └── f154672:35 IS DISTINCT FROM NULL
1354
+
│ └── projections
1355
+
│ ├── (f154672:35).k [as=k_new:36]
1356
+
│ └── (f154672:35).a [as=a_new:37]
1357
+
└── projections
1358
+
├── CASE WHEN k:9 IS NULL THEN k_new:29 ELSE k_new:36 END [as=upsert_k:39]
1359
+
├── CASE WHEN k:9 IS NULL THEN a_new:30 ELSE a_new:37 END [as=upsert_a:40]
1360
+
└── CASE WHEN k:9 IS NULL THEN b_comp:8 ELSE a_new:37 + 1 END [as=upsert_b:41]
0 commit comments