98 elog(
ERROR,
"cache lookup failed for partition key of relation %u",
112 key->strategy =
form->partstrat;
113 key->partnatts =
form->partnatts;
119 elog(
ERROR,
"invalid partition strategy \"%c\"", key->strategy);
191 for (
i = 0;
i < key->partnatts;
i++)
216 errmsg(
"operator class \"%s\" of access method %s is missing support function %d for type %s",
226 key->partcollation[
i] = collation->
values[
i];
233 key->parttypid[
i] =
att->atttypid;
234 key->parttypmod[
i] =
att->atttypmod;
235 key->parttypcoll[
i] =
att->attcollation;
240 elog(
ERROR,
"wrong number of partition key expressions");
250 &key->parttypbyval[
i],
251 &key->parttypalign[
i]);
280 if (!rel->
rd_rel->relispartition)
368 elog(
ERROR,
"cache lookup failed for relation %u",
387 if (parent->
rd_rel->relispartition)
415 "partition constraint",
#define TextDatumGetCString(d)
#define Assert(condition)
#define OidIsValid(objectId)
Node * eval_const_expressions(PlannerInfo *root, Node *node)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc0_array(type, count)
void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt)
#define HASHEXTENDED_PROC
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
List * list_concat(List *list1, const List *list2)
bool get_rel_relispartition(Oid relid)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
Oid get_opfamily_proc(Oid opfamily, Oid lefttype, Oid righttype, int16 procnum)
Expr * makeBoolExpr(BoolExprType boolop, List *args, int location)
void * MemoryContextAllocZero(MemoryContext context, Size size)
void MemoryContextSetParent(MemoryContext context, MemoryContext new_parent)
void pfree(void *pointer)
MemoryContext CurTransactionContext
MemoryContext CacheMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_SMALL_SIZES
#define MemoryContextCopyAndSetIdentifier(cxt, id)
Oid exprType(const Node *expr)
int32 exprTypmod(const Node *expr)
Oid exprCollation(const Node *expr)
void fix_opfuncids(Node *node)
#define castNode(_type_, nodeptr)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
@ PARTITION_STRATEGY_HASH
@ PARTITION_STRATEGY_LIST
@ PARTITION_STRATEGY_RANGE
List * get_qual_from_partbound(Relation parent, PartitionBoundSpec *spec)
List * RelationGetPartitionQual(Relation rel)
static List * generate_partition_qual(Relation rel)
static void RelationBuildPartitionKey(Relation relation)
Expr * get_partition_qual_relid(Oid relid)
PartitionKey RelationGetPartitionKey(Relation rel)
struct PartitionKeyData * PartitionKey
List * map_partition_varattnos(List *expr, int fromrel_varno, Relation to_rel, Relation from_rel)
Oid get_partition_parent(Oid relid, bool even_if_detached)
FormData_pg_attribute * Form_pg_attribute
static int list_length(const List *l)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
FormData_pg_opclass * Form_pg_opclass
FormData_pg_partitioned_table * Form_pg_partitioned_table
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
void * stringToNode(const char *str)
#define RelationGetRelid(relation)
#define RelationGetRelationName(relation)
void relation_close(Relation relation, LOCKMODE lockmode)
Relation relation_open(Oid relationId, LOCKMODE lockmode)
void check_stack_depth(void)
MemoryContext rd_partkeycxt
MemoryContext rd_partcheckcxt
Oid values[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
Datum SysCacheGetAttrNotNull(int cacheId, HeapTuple tup, AttrNumber attributeNumber)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)