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