108 #define REL_ALIAS_PREFIX "r"
110 #define ADD_REL_QUALIFIER(buf, varno) \
111 appendStringInfo((buf), "%s%d.", REL_ALIAS_PREFIX, (varno))
112 #define SUBQUERY_REL_ALIAS_PREFIX "s"
113 #define SUBQUERY_COL_ALIAS_PREFIX "c"
135 List **retrieved_attrs);
138 List **retrieved_attrs,
144 List *withCheckOptionList,
146 List **retrieved_attrs);
181 List **additional_conds,
189 List **additional_conds,
List **params_list);
204 int *relno,
int *colno);
206 int *relno,
int *colno);
227 foreach(lc, input_conds)
232 *remote_conds =
lappend(*remote_conds, ri);
234 *local_conds =
lappend(*local_conds, ri);
315 bool check_type =
true;
361 collation = var->varcollid;
367 collation = var->varcollid;
369 collation == DEFAULT_COLLATION_OID)
399 switch (
c->consttype)
402 case REGPROCEDUREOID:
404 ProcedureRelationId, fpinfo))
410 OperatorRelationId, fpinfo))
415 RelationRelationId, fpinfo))
420 TypeRelationId, fpinfo))
423 case REGCOLLATIONOID:
425 CollationRelationId, fpinfo))
439 TSConfigRelationId, fpinfo))
442 case REGDICTIONARYOID:
445 TSDictionaryRelationId, fpinfo))
448 case REGNAMESPACEOID:
450 NamespaceRelationId, fpinfo))
455 AuthIdRelationId, fpinfo))
467 collation =
c->constcollid;
469 collation == DEFAULT_COLLATION_OID)
498 collation = p->paramcollid;
500 collation == DEFAULT_COLLATION_OID)
506 case T_SubscriptingRef:
520 glob_cxt, &inner_cxt, case_arg_cxt))
525 glob_cxt, &inner_cxt, case_arg_cxt))
530 glob_cxt, &inner_cxt, case_arg_cxt))
538 collation = sr->refcollid;
542 collation == inner_cxt.collation)
544 else if (collation == DEFAULT_COLLATION_OID)
566 glob_cxt, &inner_cxt, case_arg_cxt))
576 fe->inputcollid != inner_cxt.collation)
585 collation =
fe->funccollid;
589 collation == inner_cxt.collation)
591 else if (collation == DEFAULT_COLLATION_OID)
614 glob_cxt, &inner_cxt, case_arg_cxt))
624 oe->inputcollid != inner_cxt.collation)
628 collation = oe->opcollid;
632 collation == inner_cxt.collation)
634 else if (collation == DEFAULT_COLLATION_OID)
640 case T_ScalarArrayOpExpr:
654 glob_cxt, &inner_cxt, case_arg_cxt))
664 oe->inputcollid != inner_cxt.collation)
680 glob_cxt, &inner_cxt, case_arg_cxt))
687 collation = r->resultcollid;
691 collation == inner_cxt.collation)
693 else if (collation == DEFAULT_COLLATION_OID)
707 glob_cxt, &inner_cxt, case_arg_cxt))
723 glob_cxt, &inner_cxt, case_arg_cxt))
748 glob_cxt, &arg_cxt, case_arg_cxt))
753 foreach(lc, ce->
args)
776 opArgs = ((
OpExpr *) whenExpr)->args;
791 glob_cxt, &tmp_cxt, &arg_cxt))
796 glob_cxt, &inner_cxt, case_arg_cxt))
802 glob_cxt, &inner_cxt, case_arg_cxt))
813 collation = ce->casecollid;
819 else if (collation == DEFAULT_COLLATION_OID)
838 collation =
c->collation;
844 else if (collation == DEFAULT_COLLATION_OID)
858 glob_cxt, &inner_cxt, case_arg_cxt))
865 collation =
a->array_collid;
869 collation == inner_cxt.collation)
871 else if (collation == DEFAULT_COLLATION_OID)
888 glob_cxt, &inner_cxt, case_arg_cxt))
925 foreach(lc, agg->
args)
938 glob_cxt, &inner_cxt, case_arg_cxt))
971 glob_cxt, &inner_cxt, case_arg_cxt))
990 collation = agg->aggcollid;
996 else if (collation == DEFAULT_COLLATION_OID)
1041 if (outer_cxt->
collation == DEFAULT_COLLATION_OID)
1046 else if (collation != DEFAULT_COLLATION_OID)
1099 relids = baserel->
relids;
1233 bool has_final_sort,
bool has_limit,
bool is_subquery,
1234 List **retrieved_attrs,
List **params_list)
1251 context.params_list = params_list;
1269 quals = remote_conds;
1385 (
Index) 0, NULL, &additional_conds,
1388 if (additional_conds !=
NIL)
1410 List **retrieved_attrs)
1417 *retrieved_attrs =
NIL;
1424 for (
i = 1;
i <= tupdesc->
natts;
i++)
1429 if (attr->attisdropped)
1432 if (have_wholerow ||
1438 else if (is_returning)
1457 else if (is_returning)
1470 if (first && !is_returning)
1573 bool is_first =
true;
1609 bool need_and =
false;
1612 if (exprs !=
NIL || additional_conds !=
NIL)
1628 foreach(lc, additional_conds)
1660 elog(
ERROR,
"unsupported join type %d", jointype);
1681 List **retrieved_attrs,
1688 *retrieved_attrs =
NIL;
1696 else if (is_returning)
1701 *retrieved_attrs =
lappend_int(*retrieved_attrs,
i + 1);
1705 if (
i == 0 && !is_returning)
1760 bool use_alias,
Index ignore_rel,
List **ignore_conds,
1761 List **additional_conds,
List **params_list)
1771 bool outerrel_is_target =
false;
1772 bool innerrel_is_target =
false;
1773 List *additional_conds_i =
NIL;
1774 List *additional_conds_o =
NIL;
1799 if (outerrel->
relid == ignore_rel)
1800 outerrel_is_target =
true;
1801 else if (innerrel->
relid == ignore_rel)
1802 innerrel_is_target =
true;
1806 if (!outerrel_is_target)
1811 ignore_rel, ignore_conds, &additional_conds_o,
1823 if (innerrel_is_target)
1829 if (additional_conds_o !=
NIL)
1832 *additional_conds = additional_conds_o;
1839 if (!innerrel_is_target)
1844 ignore_rel, ignore_conds, &additional_conds_i,
1866 context.foreignrel = foreignrel;
1869 context.params_list = params_list;
1881 if (additional_conds_i !=
NIL)
1884 additional_conds_i =
NIL;
1890 *additional_conds =
lappend(*additional_conds,
str.data);
1897 if (outerrel_is_target)
1903 if (additional_conds_i !=
NIL)
1906 *additional_conds = additional_conds_i;
1913 Assert(!outerrel_is_target && !innerrel_is_target);
1941 context.foreignrel = foreignrel;
1944 context.params_list = params_list;
1962 if (additional_conds_o !=
NIL)
1964 *additional_conds =
list_concat(*additional_conds,
1965 additional_conds_o);
1969 if (additional_conds_i !=
NIL)
1971 *additional_conds =
list_concat(*additional_conds,
1972 additional_conds_i);
2007 bool make_subquery,
Index ignore_rel,
List **ignore_conds,
2008 List **additional_conds,
List **params_list)
2020 List *retrieved_attrs;
2028 Assert(ignore_rel == 0 ||
2036 &retrieved_attrs, params_list);
2054 for (
i = 1;
i <= ncols;
i++)
2066 ignore_conds, additional_conds,
2083 List *targetAttrs,
bool doNothing,
2084 List *withCheckOptionList,
List *returningList,
2085 List **retrieved_attrs,
int *values_end_len)
2100 foreach(lc, targetAttrs)
2115 foreach(lc, targetAttrs)
2124 if (attr->attgenerated)
2137 *values_end_len =
buf->len;
2144 withCheckOptionList, returningList, retrieved_attrs);
2155 char *orig_query,
List *target_attrs,
2156 int values_end_len,
int num_params,
2166 Assert((values_end_len > 0) && (values_end_len <= strlen(orig_query)));
2175 pindex = num_params + 1;
2176 for (
i = 0;
i < num_rows;
i++)
2181 foreach(lc, target_attrs)
2190 if (attr->attgenerated)
2217 List *withCheckOptionList,
List *returningList,
2218 List **retrieved_attrs)
2231 foreach(lc, targetAttrs)
2241 if (attr->attgenerated)
2253 withCheckOptionList, returningList, retrieved_attrs);
2281 List *returningList,
2282 List **retrieved_attrs)
2294 context.foreignrel = foreignrel;
2297 context.params_list = params_list;
2309 forboth(lc, targetlist, lc2, targetAttrs)
2335 &ignore_conds, &additional_conds, params_list);
2336 remote_conds =
list_concat(remote_conds, ignore_conds);
2341 if (additional_conds !=
NIL)
2349 NIL, returningList, retrieved_attrs);
2362 List *returningList,
2363 List **retrieved_attrs)
2371 NIL, returningList, retrieved_attrs);
2394 List *returningList,
2395 List **retrieved_attrs)
2402 context.foreignrel = foreignrel;
2405 context.params_list = params_list;
2418 &ignore_conds, &additional_conds, params_list);
2419 remote_conds =
list_concat(remote_conds, ignore_conds);
2424 if (additional_conds !=
NIL)
2432 rtindex, rel,
false,
2433 NIL, returningList, retrieved_attrs);
2442 bool trig_after_row,
2443 List *withCheckOptionList,
2444 List *returningList,
2445 List **retrieved_attrs)
2456 if (withCheckOptionList !=
NIL)
2471 if (returningList !=
NIL)
2481 if (attrs_used != NULL)
2485 *retrieved_attrs =
NIL;
2561 List **retrieved_attrs)
2571 *retrieved_attrs =
NIL;
2574 for (
i = 0;
i < tupdesc->
natts;
i++)
2592 if (strcmp(def->
defname,
"column_name") == 0)
2601 *retrieved_attrs =
lappend_int(*retrieved_attrs,
i + 1);
2615 switch (sample_method)
2635 elog(
ERROR,
"unexpected sampling method");
2664 restart_seqs ?
"RESTART" :
"CONTINUE");
2689 else if (varattno < 0)
2700 fetchval = rte->
relid;
2711 else if (varattno == 0)
2718 List *retrieved_attrs;
2764 char *colname = NULL;
2780 if (strcmp(def->
defname,
"column_name") == 0)
2791 if (colname == NULL)
2810 const char *nspname = NULL;
2824 if (strcmp(def->
defname,
"schema_name") == 0)
2826 else if (strcmp(def->
defname,
"table_name") == 0)
2834 if (nspname == NULL)
2857 if (strchr(
val,
'\\') != NULL)
2860 for (valptr =
val; *valptr; valptr++)
2898 case T_SubscriptingRef:
2907 case T_DistinctExpr:
2910 case T_ScalarArrayOpExpr:
2932 elog(
ERROR,
"unsupported expression type for deparse: %d",
2982 foreach(lc, *
context->params_list)
3024 bool isfloat =
false;
3025 bool isstring =
false;
3028 if (node->constisnull)
3034 node->consttypmod));
3039 &typoutput, &typIsVarlena);
3056 if (strspn(extval,
"0123456789+-eE.") == strlen(extval))
3058 if (extval[0] ==
'+' || extval[0] ==
'-')
3062 if (strcspn(extval,
"eE.") != strlen(extval))
3074 if (strcmp(extval,
"t") == 0)
3105 needlabel = !isfloat || (node->consttypmod >= 0);
3111 needlabel = !isstring;
3117 if (needlabel || showtype > 0)
3120 node->consttypmod));
3140 foreach(lc, *
context->params_list)
3234 Oid rettype = node->funcresulttype;
3235 int32 coercedTypmod;
3247 use_variadic = node->funcvariadic;
3280 bool canSuppressRightConstCast =
false;
3286 elog(
ERROR,
"cache lookup failed for operator %u", node->
opno);
3288 oprkind = form->oprkind;
3305 bool canSuppressLeftConstCast =
false;
3333 if (leftType == rightType)
3341 if (canSuppressLeftConstCast)
3355 if (canSuppressRightConstCast)
3409 opname =
NameStr(opform->oprname);
3412 if (opform->oprnamespace != PG_CATALOG_NAMESPACE)
3414 const char *opnspname;
3461 elog(
ERROR,
"cache lookup failed for operator %u", node->
opno);
3501 node->resulttypmod));
3511 const char *op = NULL;
3532 foreach(lc, node->
args)
3587 if (node->
arg != NULL)
3594 foreach(lc, node->
args)
3600 if (node->
arg == NULL)
3664 use_variadic = node->aggvariadic;
3673 if (AGGKIND_IS_ORDERED_SET(node->aggkind))
3679 Assert(!node->aggvariadic);
3753 foreach(lc, orderList)
3786 if (sortop == typentry->
lt_opr)
3788 else if (sortop == typentry->
gt_opr)
3800 elog(
ERROR,
"cache lookup failed for operator %u", sortop);
3914 bool gotone =
false;
3919 foreach(lcell, pathkeys)
3947 elog(
ERROR,
"could not find pathkey item to sort");
3981 elog(
ERROR,
"missing operator %d(%u,%u) in opfamily %u",
4011 if (
root->parse->limitCount)
4016 if (
root->parse->limitOffset)
4039 elog(
ERROR,
"cache lookup failed for function %u", funcid);
4043 if (procform->pronamespace != PG_CATALOG_NAMESPACE)
4045 const char *schemaname;
4090 else if (!expr ||
IsA(expr,
Var))
4100 return (
Node *) expr;
4173 int *relno,
int *colno)
4205 elog(
ERROR,
"unexpected expression in subquery output");
int bms_next_member(const Bitmapset *a, int prevbit)
void bms_free(Bitmapset *a)
bool bms_is_member(int x, const Bitmapset *a)
Bitmapset * bms_make_singleton(int x)
Bitmapset * bms_add_member(Bitmapset *a, int x)
BMS_Membership bms_membership(const Bitmapset *a)
#define FORMAT_TYPE_TYPEMOD_GIVEN
#define FORMAT_TYPE_FORCE_QUALIFY
#define Assert(condition)
#define ESCAPE_STRING_SYNTAX
#define SQL_STR_DOUBLE(ch, escape_backslash)
#define OidIsValid(objectId)
bool contain_mutable_functions(Node *clause)
char * defGetString(DefElem *def)
static void deparseRangeTblRef(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, bool make_subquery, Index ignore_rel, List **ignore_conds, List **additional_conds, List **params_list)
static void deparseCaseExpr(CaseExpr *node, deparse_expr_cxt *context)
void deparseAnalyzeSizeSql(StringInfo buf, Relation rel)
static void deparseBoolExpr(BoolExpr *node, deparse_expr_cxt *context)
static void appendGroupByClause(List *tlist, deparse_expr_cxt *context)
static void deparseTargetList(StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, bool is_returning, Bitmapset *attrs_used, bool qualify_col, List **retrieved_attrs)
#define SUBQUERY_REL_ALIAS_PREFIX
static void deparseFromExpr(List *quals, deparse_expr_cxt *context)
static Node * deparseSortGroupClause(Index ref, List *tlist, bool force_colno, deparse_expr_cxt *context)
static void deparseLockingClause(deparse_expr_cxt *context)
const char * get_jointype_name(JoinType jointype)
void deparseAnalyzeInfoSql(StringInfo buf, Relation rel)
static void deparseAggref(Aggref *node, deparse_expr_cxt *context)
static void appendOrderBySuffix(Oid sortop, Oid sortcoltype, bool nulls_first, deparse_expr_cxt *context)
void deparseDirectDeleteSql(StringInfo buf, PlannerInfo *root, Index rtindex, Relation rel, RelOptInfo *foreignrel, List *remote_conds, List **params_list, List *returningList, List **retrieved_attrs)
void deparseDirectUpdateSql(StringInfo buf, PlannerInfo *root, Index rtindex, Relation rel, RelOptInfo *foreignrel, List *targetlist, List *targetAttrs, List *remote_conds, List **params_list, List *returningList, List **retrieved_attrs)
struct deparse_expr_cxt deparse_expr_cxt
static void get_relation_column_alias_ids(Var *node, RelOptInfo *foreignrel, int *relno, int *colno)
static void printRemoteParam(int paramindex, Oid paramtype, int32 paramtypmod, deparse_expr_cxt *context)
static bool is_subquery_var(Var *node, RelOptInfo *foreignrel, int *relno, int *colno)
bool is_foreign_param(PlannerInfo *root, RelOptInfo *baserel, Expr *expr)
static void printRemotePlaceholder(Oid paramtype, int32 paramtypmod, deparse_expr_cxt *context)
static void appendOrderByClause(List *pathkeys, bool has_final_sort, deparse_expr_cxt *context)
static bool foreign_expr_walker(Node *node, foreign_glob_cxt *glob_cxt, foreign_loc_cxt *outer_cxt, foreign_loc_cxt *case_arg_cxt)
static void deparseColumnRef(StringInfo buf, int varno, int varattno, RangeTblEntry *rte, bool qualify_col)
static void deparseRelabelType(RelabelType *node, deparse_expr_cxt *context)
static void deparseNullTest(NullTest *node, deparse_expr_cxt *context)
static void deparseOperatorName(StringInfo buf, Form_pg_operator opform)
static void deparseOpExpr(OpExpr *node, deparse_expr_cxt *context)
static void deparseConst(Const *node, deparse_expr_cxt *context, int showtype)
static bool isPlainForeignVar(Expr *node, deparse_expr_cxt *context)
static void deparseDistinctExpr(DistinctExpr *node, deparse_expr_cxt *context)
void deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *rel, List *tlist, List *remote_conds, List *pathkeys, bool has_final_sort, bool has_limit, bool is_subquery, List **retrieved_attrs, List **params_list)
static void deparseFuncExpr(FuncExpr *node, deparse_expr_cxt *context)
void deparseStringLiteral(StringInfo buf, const char *val)
void rebuildInsertSql(StringInfo buf, Relation rel, char *orig_query, List *target_attrs, int values_end_len, int num_params, int num_rows)
struct foreign_glob_cxt foreign_glob_cxt
static void deparseArrayExpr(ArrayExpr *node, deparse_expr_cxt *context)
void deparseInsertSql(StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *targetAttrs, bool doNothing, List *withCheckOptionList, List *returningList, List **retrieved_attrs, int *values_end_len)
static void deparseReturningList(StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, bool trig_after_row, List *withCheckOptionList, List *returningList, List **retrieved_attrs)
void deparseUpdateSql(StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *targetAttrs, List *withCheckOptionList, List *returningList, List **retrieved_attrs)
static void deparseVar(Var *node, deparse_expr_cxt *context)
static void appendFunctionName(Oid funcid, deparse_expr_cxt *context)
static void appendConditions(List *exprs, deparse_expr_cxt *context)
struct foreign_loc_cxt foreign_loc_cxt
void deparseDeleteSql(StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *returningList, List **retrieved_attrs)
void deparseAnalyzeSql(StringInfo buf, Relation rel, PgFdwSamplingMethod sample_method, double sample_frac, List **retrieved_attrs)
static void deparseSubscriptingRef(SubscriptingRef *node, deparse_expr_cxt *context)
static void deparseRelation(StringInfo buf, Relation rel)
static void deparseExplicitTargetList(List *tlist, bool is_returning, List **retrieved_attrs, deparse_expr_cxt *context)
static char * deparse_type_name(Oid type_oid, int32 typemod)
#define ADD_REL_QUALIFIER(buf, varno)
static void appendLimitClause(deparse_expr_cxt *context)
static void deparseExpr(Expr *node, deparse_expr_cxt *context)
bool is_foreign_expr(PlannerInfo *root, RelOptInfo *baserel, Expr *expr)
List * build_tlist_to_deparse(RelOptInfo *foreignrel)
static void deparseFromExprForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, bool use_alias, Index ignore_rel, List **ignore_conds, List **additional_conds, List **params_list)
#define SUBQUERY_COL_ALIAS_PREFIX
void classifyConditions(PlannerInfo *root, RelOptInfo *baserel, List *input_conds, List **remote_conds, List **local_conds)
static void deparseScalarArrayOpExpr(ScalarArrayOpExpr *node, deparse_expr_cxt *context)
static void appendWhereClause(List *exprs, List *additional_conds, deparse_expr_cxt *context)
void deparseTruncateSql(StringInfo buf, List *rels, DropBehavior behavior, bool restart_seqs)
static void deparseSubqueryTargetList(deparse_expr_cxt *context)
bool is_foreign_pathkey(PlannerInfo *root, RelOptInfo *baserel, PathKey *pathkey)
static void deparseSelectSql(List *tlist, bool is_subquery, List **retrieved_attrs, deparse_expr_cxt *context)
static void deparseParam(Param *node, deparse_expr_cxt *context)
static void appendAggOrderBy(List *orderList, List *targetList, deparse_expr_cxt *context)
bool equal(const void *a, const void *b)
char * OidOutputFunctionCall(Oid functionId, Datum val)
ForeignTable * GetForeignTable(Oid relid)
List * GetForeignColumnOptions(Oid relid, AttrNumber attnum)
#define HeapTupleIsValid(tuple)
if(TABLE==NULL||TABLE_index==NULL)
List * lappend(List *list, void *datum)
List * lappend_int(List *list, int datum)
void list_free(List *list)
List * list_concat(List *list1, const List *list2)
void list_free_deep(List *list)
bool type_is_rowtype(Oid typid)
char * get_namespace_name(Oid nspid)
void getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena)
Oid get_opfamily_member(Oid opfamily, Oid lefttype, Oid righttype, int16 strategy)
char * get_attname(Oid relid, AttrNumber attnum, bool missing_ok)
void pfree(void *pointer)
Oid exprType(const Node *expr)
bool exprIsLengthCoercion(const Node *expr, int32 *coercedTypmod)
Node * strip_implicit_coercions(Node *node)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
#define PVC_RECURSE_PLACEHOLDERS
#define IS_SIMPLE_REL(rel)
#define planner_rt_fetch(rti, root)
#define IS_UPPER_REL(rel)
FormData_pg_attribute * Form_pg_attribute
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define forboth(cell1, list1, cell2, list2)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
FormData_pg_operator * Form_pg_operator
FormData_pg_proc * Form_pg_proc
static Oid DatumGetObjectId(Datum X)
static Datum ObjectIdGetDatum(Oid X)
void reset_transmission_modes(int nestlevel)
int set_transmission_modes(void)
EquivalenceMember * find_em_for_rel(PlannerInfo *root, EquivalenceClass *ec, RelOptInfo *rel)
EquivalenceMember * find_em_for_rel_target(PlannerInfo *root, EquivalenceClass *ec, RelOptInfo *rel)
bool is_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo)
bool is_builtin(Oid objectId)
@ ANALYZE_SAMPLE_BERNOULLI
PlanRowMark * get_plan_rowmark(List *rowmarks, Index rtindex)
#define IS_SPECIAL_VARNO(varno)
#define RelationGetRelid(relation)
#define RelationGetDescr(relation)
#define RelationGetRelationName(relation)
#define RelationGetNamespace(relation)
const char * quote_identifier(const char *ident)
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendBinaryStringInfo(StringInfo str, const void *data, int datalen)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
NullTestType nulltesttype
bool make_outerrel_subquery
Relids lower_subquery_rels
bool make_innerrel_subquery
LockClauseStrength strength
struct PathTarget * reltarget
bool trig_update_after_row
bool trig_insert_after_row
bool trig_delete_after_row
#define FirstLowInvalidHeapAttributeNumber
#define TableOidAttributeNumber
#define SelfItemPointerAttributeNumber
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
TargetEntry * get_sortgroupref_tle(Index sortref, List *targetList)
List * add_to_flat_tlist(List *tlist, List *exprs)
#define FirstNormalObjectId
#define TupleDescAttr(tupdesc, i)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
List * pull_var_clause(Node *node, int flags)
void pull_varattnos(Node *node, Index varno, Bitmapset **varattnos)