1 | /*------------------------------------------------------------------------- |
2 | * |
3 | * partition.h |
4 | * Header file for structures and utility functions related to |
5 | * partitioning |
6 | * |
7 | * Copyright (c) 2007-2019, 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); |
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 | bool *found_whole_row); |
28 | extern bool has_partition_attrs(Relation rel, Bitmapset *attnums, |
29 | bool *used_in_expr); |
30 | |
31 | extern Oid get_default_partition_oid(Oid parentId); |
32 | extern void update_default_partition_oid(Oid parentId, Oid defaultPartId); |
33 | extern List *get_proposed_default_constraint(List *new_part_constraints); |
34 | |
35 | #endif /* PARTITION_H */ |
36 | |