Add new RTE types to CitusRTEKind

PostgreSQL 10 adds two new RTEKind values and compilation will complain
unless we handle them.
pull/1439/head
Jason Petersen 2017-04-19 23:21:04 -06:00
parent 1d52af2492
commit 59a4fb596c
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
2 changed files with 10 additions and 0 deletions

View File

@ -294,6 +294,10 @@ GetRangeTblKind(RangeTblEntry *rte)
switch (rte->rtekind)
{
/* directly rtekind if it's not possibly an extended RTE */
#if (PG_VERSION_NUM >= 100000)
case RTE_TABLEFUNC:
case RTE_NAMEDTUPLESTORE:
#endif
case RTE_RELATION:
case RTE_SUBQUERY:
case RTE_JOIN:

View File

@ -55,8 +55,14 @@ typedef enum CitusRTEKind
CITUS_RTE_SUBQUERY = RTE_SUBQUERY, /* subquery in FROM */
CITUS_RTE_JOIN = RTE_JOIN, /* join */
CITUS_RTE_FUNCTION = RTE_FUNCTION, /* function in FROM */
#if (PG_VERSION_NUM >= 100000)
CITUS_RTE_TABLEFUNC = RTE_TABLEFUNC, /* TableFunc(.., column list) */
#endif
CITUS_RTE_VALUES = RTE_VALUES, /* VALUES (<exprlist>), (<exprlist>), ... */
CITUS_RTE_CTE = RTE_CTE, /* common table expr (WITH list element) */
#if (PG_VERSION_NUM >= 100000)
CITUS_RTE_NAMEDTUPLESTORE = RTE_NAMEDTUPLESTORE, /* tuplestore, e.g. for triggers */
#endif
CITUS_RTE_SHARD,
CITUS_RTE_REMOTE_QUERY
} CitusRTEKind;