codekingpro/portable-devtools
115k
1/*-------------------------------------------------------------------------2 *3 * amvalidate.h4 * Support routines for index access methods' amvalidate and5 * amadjustmembers functions.6 *7 * Copyright (c) 2016-2023, PostgreSQL Global Development Group8 *9 * src/include/access/amvalidate.h10 *11 *-------------------------------------------------------------------------12 */13#ifndef AMVALIDATE_H14#define AMVALIDATE_H15 16#include "utils/catcache.h"17 18 19/* Struct returned (in a list) by identify_opfamily_groups() */20typedef struct OpFamilyOpFuncGroup21{22 Oid lefttype; /* amoplefttype/amproclefttype */23 Oid righttype; /* amoprighttype/amprocrighttype */24 uint64 operatorset; /* bitmask of operators with these types */25 uint64 functionset; /* bitmask of support funcs with these types */26} OpFamilyOpFuncGroup;27 28 29/* Functions in access/index/amvalidate.c */30extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist);31extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact,32 int minargs, int maxargs,...);33extern bool check_amoptsproc_signature(Oid funcid);34extern bool check_amop_signature(Oid opno, Oid restype,35 Oid lefttype, Oid righttype);36extern Oid opclass_for_family_datatype(Oid amoid, Oid opfamilyoid,37 Oid datatypeoid);38extern bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid);39 40#endif /* AMVALIDATE_H */41 