add an explicit RTE_GROUP clause that does nothing (or falls through like VALUES/RESULT) for PG 18

Without it, an UPDATE … FROM (SELECT … GROUP BY …) on PG 18 will raise “Unrecognized range table entry.”
Mehmet Yilmaz 2025-06-27 09:26:52 +00:00
parent 7aa347dfb6
commit 286fd07ff5
1 changed files with 3 additions and 0 deletions

View File

@ -1027,6 +1027,9 @@ ModifyQuerySupported(Query *queryTree, Query *originalQuery, bool multiShardQuer
}
else if (rangeTableEntry->rtekind == RTE_VALUES ||
rangeTableEntry->rtekind == RTE_RESULT
#if PG_VERSION_NUM >= PG_VERSION_18
|| rangeTableEntry->rtekind == RTE_GROUP /* Accept synthetic GROUP */
#endif
)
{
/* do nothing, this type is supported */