2
0

partition.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*-------------------------------------------------------------------------
  2. *
  3. * partition.h
  4. * Header file for structures and utility functions related to
  5. * partitioning
  6. *
  7. * Copyright (c) 2007-2022, PostgreSQL Global Development Group
  8. *
  9. * src/include/catalog/partition.h
  10. *
  11. *-------------------------------------------------------------------------
  12. */
  13. #ifndef PARTITION_H
  14. #define PARTITION_H
  15. #include "partitioning/partdefs.h"
  16. #include "utils/relcache.h"
  17. /* Seed for the extended hash function */
  18. #define HASH_PARTITION_SEED UINT64CONST(0x7A5B22367996DCFD)
  19. extern Oid get_partition_parent(Oid relid, bool even_if_detached);
  20. extern List *get_partition_ancestors(Oid relid);
  21. extern Oid index_get_partition(Relation partition, Oid indexId);
  22. extern List *map_partition_varattnos(List *expr, int fromrel_varno,
  23. Relation to_rel, Relation from_rel);
  24. extern bool has_partition_attrs(Relation rel, Bitmapset *attnums,
  25. bool *used_in_expr);
  26. extern Oid get_default_partition_oid(Oid parentId);
  27. extern void update_default_partition_oid(Oid parentId, Oid defaultPartId);
  28. extern List *get_proposed_default_constraint(List *new_part_constraints);
  29. #endif /* PARTITION_H */