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
22extern Oid get_partition_parent(Oid relid);
23extern List *get_partition_ancestors(Oid relid);
24extern Oid index_get_partition(Relation partition, Oid indexId);
25extern List *map_partition_varattnos(List *expr, int fromrel_varno,
26 Relation to_rel, Relation from_rel,
27 bool *found_whole_row);
28extern bool has_partition_attrs(Relation rel, Bitmapset *attnums,
29 bool *used_in_expr);
30
31extern Oid get_default_partition_oid(Oid parentId);
32extern void update_default_partition_oid(Oid parentId, Oid defaultPartId);
33extern List *get_proposed_default_constraint(List *new_part_constraints);
34
35#endif /* PARTITION_H */
36