1 /*------------------------------------------------------------------------- 2 * 3 * partition.h 4 * Header file for structures and utility functions related to 5 * partitioning 6 * 7 * Copyright (c) 2007-2021, 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 */ 35