56 if (rel->
rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
101 elog(
ERROR,
"cache lookup failed for partition key of relation %u",
123 attrs = form->partattrs.values;
128 Anum_pg_partitioned_table_partclass, &isnull);
134 Anum_pg_partitioned_table_partcollation, &isnull);
140 Anum_pg_partitioned_table_partexprs, &isnull);
209 opclassform->opcintype,
210 opclassform->opcintype,
214 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
215 errmsg(
"operator class \"%s\" of access method %s is missing support function %d for type %s",
238 if (partexprs_item == NULL)
239 elog(
ERROR,
"wrong number of partition key expressions");
279 if (!rel->
rd_rel->relispartition)
360 elog(
ERROR,
"cache lookup failed for relation %u",
364 Anum_pg_class_relpartbound,
379 if (parent->
rd_rel->relispartition)
407 "partition constraint",
#define AllocSetContextCreate
static ListCell * lnext(const List *l, const ListCell *c)
#define castNode(_type_, nodeptr)
int32 exprTypmod(const Node *expr)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
void MemoryContextSetParent(MemoryContext context, MemoryContext new_parent)
#define TupleDescAttr(tupdesc, i)
void fix_opfuncids(Node *node)
#define ALLOCSET_SMALL_SIZES
List * get_qual_from_partbound(Relation rel, Relation parent, PartitionBoundSpec *spec)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
MemoryContext CurTransactionContext
List * list_concat(List *list1, const List *list2)
int errcode(int sqlerrcode)
void * stringToNode(const char *str)
#define HASHEXTENDED_PROC
Node * eval_const_expressions(PlannerInfo *root, Node *node)
PartitionKey RelationGetPartitionKey(Relation rel)
FormData_pg_partitioned_table * Form_pg_partitioned_table
#define OidIsValid(objectId)
Expr * makeBoolExpr(BoolExprType boolop, List *args, int location)
static void RelationBuildPartitionKey(Relation relation)
void pfree(void *pointer)
static List * generate_partition_qual(Relation rel)
#define ObjectIdGetDatum(X)
Relation relation_open(Oid relationId, LOCKMODE lockmode)
Oid get_partition_parent(Oid relid)
#define MemoryContextCopyAndSetIdentifier(cxt, id)
void check_stack_depth(void)
Oid values[FLEXIBLE_ARRAY_MEMBER]
#define RelationGetRelationName(relation)
static ListCell * list_head(const List *l)
FormData_pg_attribute * Form_pg_attribute
void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt)
bool get_rel_relispartition(Oid relid)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define TextDatumGetCString(d)
void * palloc0(Size size)
void ReleaseSysCache(HeapTuple tuple)
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
#define PARTITION_STRATEGY_HASH
void * MemoryContextAllocZero(MemoryContext context, Size size)
#define ereport(elevel,...)
#define HeapTupleIsValid(tuple)
void relation_close(Relation relation, LOCKMODE lockmode)
#define Assert(condition)
MemoryContext rd_partkeycxt
Oid get_opfamily_proc(Oid opfamily, Oid lefttype, Oid righttype, int16 procnum)
Oid exprType(const Node *expr)
static int list_length(const List *l)
Oid exprCollation(const Node *expr)
#define DatumGetPointer(X)
Expr * get_partition_qual_relid(Oid relid)
int errmsg(const char *fmt,...)
List * RelationGetPartitionQual(Relation rel)
MemoryContext rd_partcheckcxt
FormData_pg_opclass * Form_pg_opclass
List * map_partition_varattnos(List *expr, int fromrel_varno, Relation to_rel, Relation from_rel)
#define RelationGetRelid(relation)
struct PartitionKeyData * PartitionKey
MemoryContext CacheMemoryContext