add RTE_GROUP to the non-complex whitelist for PG 18.

A synthetic RTE_GROUP is harmless; treating it as “complex” flips the flag and prevents a router plan.
Mehmet Yilmaz 2025-06-27 09:20:46 +00:00
parent fdec8eab30
commit bfcb3c63fd
1 changed files with 3 additions and 0 deletions

View File

@ -1180,6 +1180,9 @@ HasComplexRangeTableType(Query *queryTree)
rangeTableEntry->rtekind != RTE_SUBQUERY && rangeTableEntry->rtekind != RTE_SUBQUERY &&
rangeTableEntry->rtekind != RTE_FUNCTION && rangeTableEntry->rtekind != RTE_FUNCTION &&
rangeTableEntry->rtekind != RTE_VALUES && rangeTableEntry->rtekind != RTE_VALUES &&
#if PG_VERSION_NUM >= PG_VERSION_18
rangeTableEntry->rtekind != RTE_GROUP &&
#endif
!IsJsonTableRTE(rangeTableEntry)) !IsJsonTableRTE(rangeTableEntry))
{ {
hasComplexRangeTableType = true; hasComplexRangeTableType = true;