amvalidate.h 1.2 KB

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