diff options
Diffstat (limited to 'src/include/access/indexamvalidate.h')
| -rw-r--r-- | src/include/access/indexamvalidate.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/include/access/indexamvalidate.h b/src/include/access/indexamvalidate.h new file mode 100644 index 00000000000..69a0520c0a6 --- /dev/null +++ b/src/include/access/indexamvalidate.h @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------- + * + * indexamvalidate.h + * Support routines for index access methods' amvalidate functions. + * + * Copyright (c) 2016-2019, PostgreSQL Global Development Group + * + * src/include/access/indexamvalidate.h + * + *------------------------------------------------------------------------- + */ +#ifndef INDEXAMVALIDATE_H +#define INDEXAMVALIDATE_H + +#include "utils/catcache.h" + + +/* Struct returned (in a list) by identify_opfamily_groups() */ +typedef struct OpFamilyOpFuncGroup +{ + Oid lefttype; /* amoplefttype/amproclefttype */ + Oid righttype; /* amoprighttype/amprocrighttype */ + uint64 operatorset; /* bitmask of operators with these types */ + uint64 functionset; /* bitmask of support funcs with these types */ +} OpFamilyOpFuncGroup; + + +/* Functions in access/index/indexamvalidate.c */ +extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist); +extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact, + int minargs, int maxargs,...); +extern bool check_amop_signature(Oid opno, Oid restype, + Oid lefttype, Oid righttype); +extern bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid); + +#endif /* INDEXAMVALIDATE_H */ |
