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 incorrectly modifying the set
and list of target columns when re-projecting 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:35]
1345
+
│ │ │ │ ├── ((k:9, a:10, CAST(NULL AS INT8)) AS k, a, b) [as=old:34]
1346
+
│ │ │ │ ├── 4 [as=b_comp:33]
1347
+
│ │ │ │ ├── 3 [as=a_new:32]
1348
+
│ │ │ │ ├── a:10 + 1 [as=b_comp:31]
1349
+
│ │ │ │ ├── (f154672:28).k [as=k_new:29]
1350
+
│ │ │ │ └── (f154672:28).a [as=a_new:30]
1351
+
│ │ │ └── projections
1352
+
│ │ │ └── CASE WHEN k:9 IS NOT NULL THEN f154672(new:35, old:34, 'tr154672', 'BEFORE', 'ROW', 'UPDATE', 61, 't154672', 't154672', 'public', 0, ARRAY[]) ELSE new:35 END [as=f154672:36]
1353
+
│ │ └── filters
1354
+
│ │ └── f154672:36 IS DISTINCT FROM NULL
1355
+
│ └── projections
1356
+
│ ├── (f154672:36).k [as=k_new:37]
1357
+
│ └── (f154672:36).a [as=a_new:38]
1358
+
└── projections
1359
+
├── CASE WHEN k:9 IS NULL THEN k_new:29 ELSE k_new:37 END [as=upsert_k:40]
1360
+
├── CASE WHEN k:9 IS NULL THEN a_new:30 ELSE a_new:38 END [as=upsert_a:41]
1361
+
└── CASE WHEN k:9 IS NULL THEN b_comp:31 ELSE a_new:38 + 1 END [as=upsert_b:42]
0 commit comments