mirror of https://github.com/citusdata/citus.git
Identify views in pg15.13
Relevant PG commit: https://github.com/postgres/postgres/commit/317aba70e Previously, when views were converted to RTE_SUBQUERY the relid would be cleared in PG15. In this patch of PG15, relid is retained. Therefore we add a check with the "relkind and rtekind" to identify the converted views.pull/7986/head
parent
209d426302
commit
45304190fa
|
@ -2246,7 +2246,8 @@ SelectsFromDistributedTable(List *rangeTableList, Query *query)
|
|||
}
|
||||
|
||||
if (rangeTableEntry->relkind == RELKIND_VIEW ||
|
||||
rangeTableEntry->relkind == RELKIND_MATVIEW)
|
||||
rangeTableEntry->relkind == RELKIND_MATVIEW ||
|
||||
(rangeTableEntry->rtekind == RTE_SUBQUERY && rangeTableEntry->relkind == 0))
|
||||
{
|
||||
/*
|
||||
* Skip over views, which would error out in GetCitusTableCacheEntry.
|
||||
|
|
Loading…
Reference in New Issue