Hi,

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.

Thanks,
Amit
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index 694e9ed..11a76af 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -1415,9 +1415,9 @@ expand_inherited_rtentry(PlannerInfo *root, RangeTblEntry *rte, Index rti)
 	heap_close(oldrelation, NoLock);
 
 	/*
-	 * 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 (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to