PostgreSQL Source Code  git master
partition.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * partition.h
4  * Header file for structures and utility functions related to
5  * partitioning
6  *
7  * Copyright (c) 2007-2024, PostgreSQL Global Development Group
8  *
9  * src/include/catalog/partition.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef PARTITION_H
14 #define PARTITION_H
15 
16 #include "partitioning/partdefs.h"
17 #include "utils/relcache.h"
18 
19 /* Seed for the extended hash function */
20 #define HASH_PARTITION_SEED UINT64CONST(0x7A5B22367996DCFD)
21 
22 extern Oid get_partition_parent(Oid relid, bool even_if_detached);
23 extern List *get_partition_ancestors(Oid relid);
24 extern Oid index_get_partition(Relation partition, Oid indexId);
25 extern List *map_partition_varattnos(List *expr, int fromrel_varno,
26  Relation to_rel, Relation from_rel);
27 extern bool has_partition_attrs(Relation rel, Bitmapset *attnums,
28  bool *used_in_expr);
29 
30 extern Oid get_default_partition_oid(Oid parentId);
31 extern void update_default_partition_oid(Oid parentId, Oid defaultPartId);
32 extern List *get_proposed_default_constraint(List *new_part_constraints);
33 
34 #endif /* PARTITION_H */
List * get_partition_ancestors(Oid relid)
Definition: partition.c:134
bool has_partition_attrs(Relation rel, Bitmapset *attnums, bool *used_in_expr)
Definition: partition.c:255
List * map_partition_varattnos(List *expr, int fromrel_varno, Relation to_rel, Relation from_rel)
Definition: partition.c:222
List * get_proposed_default_constraint(List *new_part_constraints)
Definition: partition.c:370
void update_default_partition_oid(Oid parentId, Oid defaultPartId)
Definition: partition.c:340
Oid get_default_partition_oid(Oid parentId)
Definition: partition.c:315
Oid index_get_partition(Relation partition, Oid indexId)
Definition: partition.c:176
Oid get_partition_parent(Oid relid, bool even_if_detached)
Definition: partition.c:53
unsigned int Oid
Definition: postgres_ext.h:31
Definition: pg_list.h:54