amvalidate.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*-------------------------------------------------------------------------
  2. *
  3. * amvalidate.h
  4. * Support routines for index access methods' amvalidate and
  5. * amadjustmembers functions.
  6. *
  7. * Copyright (c) 2016-2022, PostgreSQL Global Development Group
  8. *
  9. * src/include/access/amvalidate.h
  10. *
  11. *-------------------------------------------------------------------------
  12. */
  13. #ifndef AMVALIDATE_H
  14. #define AMVALIDATE_H
  15. #include "utils/catcache.h"
  16. /* Struct returned (in a list) by identify_opfamily_groups() */
  17. typedef struct OpFamilyOpFuncGroup
  18. {
  19. Oid lefttype; /* amoplefttype/amproclefttype */
  20. Oid righttype; /* amoprighttype/amprocrighttype */
  21. uint64 operatorset; /* bitmask of operators with these types */
  22. uint64 functionset; /* bitmask of support funcs with these types */
  23. } OpFamilyOpFuncGroup;
  24. /* Functions in access/index/amvalidate.c */
  25. extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist);
  26. extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact,
  27. int minargs, int maxargs,...);
  28. extern bool check_amoptsproc_signature(Oid funcid);
  29. extern bool check_amop_signature(Oid opno, Oid restype,
  30. Oid lefttype, Oid righttype);
  31. extern Oid opclass_for_family_datatype(Oid amoid, Oid opfamilyoid,
  32. Oid datatypeoid);
  33. extern bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid);
  34. #endif /* AMVALIDATE_H */