PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/hash.h"
#include "access/htup_details.h"
#include "access/nbtree.h"
#include "access/relation.h"
#include "catalog/partition.h"
#include "catalog/pg_opclass.h"
#include "catalog/pg_partitioned_table.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "optimizer/optimizer.h"
#include "partitioning/partbounds.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/partcache.h"
#include "utils/rel.h"
#include "utils/syscache.h"
Go to the source code of this file.
Functions | |
static void | RelationBuildPartitionKey (Relation relation) |
static List * | generate_partition_qual (Relation rel) |
PartitionKey | RelationGetPartitionKey (Relation rel) |
List * | RelationGetPartitionQual (Relation rel) |
Expr * | get_partition_qual_relid (Oid relid) |
Definition at line 337 of file partcache.c.
References AccessShareLock, ALLOCSET_SMALL_SIZES, AllocSetContextCreate, Assert, CacheMemoryContext, castNode, check_stack_depth(), copyObject, elog, ERROR, get_partition_parent(), get_qual_from_partbound(), HeapTupleIsValid, list_concat(), map_partition_varattnos(), MemoryContextCopyAndSetIdentifier, MemoryContextSwitchTo(), NIL, NoLock, ObjectIdGetDatum(), RelationData::rd_partcheck, RelationData::rd_partcheckcxt, RelationData::rd_partcheckvalid, RelationData::rd_rel, relation_close(), relation_open(), RelationGetRelationName, RelationGetRelid, ReleaseSysCache(), SearchSysCache1(), stringToNode(), SysCacheGetAttr(), and TextDatumGetCString.
Referenced by get_partition_qual_relid(), and RelationGetPartitionQual().
Definition at line 299 of file partcache.c.
References AccessShareLock, AND_EXPR, generate_partition_qual(), get_rel_relispartition(), linitial, list_length(), makeBoolExpr(), NIL, NoLock, relation_close(), and relation_open().
Referenced by pg_get_partconstrdef_string(), and pg_get_partition_constraintdef().
|
static |
Definition at line 78 of file partcache.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, Assert, BTORDER_PROC, CacheMemoryContext, copyObject, CurTransactionContext, DatumGetPointer(), elog, ereport, errcode(), errmsg(), ERROR, eval_const_expressions(), exprCollation(), exprType(), exprTypmod(), fix_opfuncids(), fmgr_info_cxt(), format_type_be(), get_opfamily_proc(), get_typlenbyvalalign(), GETSTRUCT, HASHEXTENDED_PROC, HeapTupleIsValid, i, sort-test::key, lfirst, list_head(), lnext(), MemoryContextAllocZero(), MemoryContextCopyAndSetIdentifier, MemoryContextSetParent(), MemoryContextSwitchTo(), NameStr, ObjectIdGetDatum(), OidIsValid, palloc0(), PARTITION_STRATEGY_HASH, PARTITION_STRATEGY_LIST, PARTITION_STRATEGY_RANGE, pfree(), RelationData::rd_att, RelationData::rd_partkey, RelationData::rd_partkeycxt, RelationGetRelationName, RelationGetRelid, ReleaseSysCache(), SearchSysCache1(), stringToNode(), SysCacheGetAttr(), SysCacheGetAttrNotNull(), TextDatumGetCString, TupleDescAttr, and oidvector::values.
Referenced by RelationGetPartitionKey().
PartitionKey RelationGetPartitionKey | ( | Relation | rel | ) |
Definition at line 51 of file partcache.c.
References RelationData::rd_partkey, RelationData::rd_rel, RelationBuildPartitionKey(), and unlikely.
Referenced by check_new_partition_bound(), CreatePartitionPruneState(), DefineIndex(), ExecBuildSlotPartitionKeyDescription(), ExecInitPartitionDispatchInfo(), find_partition_scheme(), get_qual_for_hash(), get_qual_for_list(), get_qual_for_range(), get_qual_from_partbound(), has_partition_attrs(), RelationBuildPartitionDesc(), satisfies_hash_partition(), set_baserel_partition_key_exprs(), transformPartitionBound(), transformPartitionCmd(), and transformPartitionRangeBounds().
Definition at line 277 of file partcache.c.
References generate_partition_qual(), NIL, and RelationData::rd_rel.
Referenced by ATExecAttachPartition(), DetachAddConstraintIfNeeded(), ExecPartitionCheck(), and set_baserel_partition_constraint().