Attached fixes what looks like a thinko in a comment: It is the child
relations that are "non-local" temp tables that are skipped from being
included the inheritance set. The comment in question as it stands,
doesn't note that.
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index 694e9ed..11a76af 100644
@@ -1415,9 +1415,9 @@ expand_inherited_rtentry(PlannerInfo *root, RangeTblEntry *rte, Index rti)
- * If all the children were temp tables, pretend it's a non-inheritance
- * situation. The duplicate RTE we added for the parent table is
- * harmless, so we don't bother to get rid of it.
+ * If all the children were non-local temp tables, pretend it's a
+ * non-inheritance situation. The duplicate RTE we added for the
+ * parent table is harmless, so we don't bother to get rid of it.
if (list_length(appinfos) < 2)
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: