mirror of https://github.com/citusdata/citus.git
Separate 15.13 condition for future pg15 drop
parent
dd6c8587c4
commit
c10b1083c9
|
@ -2245,16 +2245,24 @@ SelectsFromDistributedTable(List *rangeTableList, Query *query)
|
|||
continue;
|
||||
}
|
||||
|
||||
#if PG_VERSION_NUM >= 150013 && PG_VERSION_NUM < PG_VERSION_16
|
||||
if (rangeTableEntry->rtekind == RTE_SUBQUERY && rangeTableEntry->relkind == 0)
|
||||
{
|
||||
/*
|
||||
* In PG15.13 commit https://github.com/postgres/postgres/commit/317aba70e
|
||||
* relid is retained when converting views to subqueries,
|
||||
* so we need an extra check identifying those views
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (rangeTableEntry->relkind == RELKIND_VIEW ||
|
||||
rangeTableEntry->relkind == RELKIND_MATVIEW ||
|
||||
(rangeTableEntry->rtekind == RTE_SUBQUERY && rangeTableEntry->relkind == 0))
|
||||
rangeTableEntry->relkind == RELKIND_MATVIEW)
|
||||
{
|
||||
/*
|
||||
* Skip over views, which would error out in GetCitusTableCacheEntry.
|
||||
* Distributed tables within (regular) views are already in rangeTableList.
|
||||
* In PG15.13 commit https://github.com/postgres/postgres/commit/317aba70e
|
||||
* relid is retained when converting views to subqueries,
|
||||
* so we need an extra check identifying those views
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue