134 indoption_val = indoption->
values[attno - 1];
136 *
res = (indoption_val & iopt_mask) == iopt_expect;
152 const char *propname,
153 Oid amoid,
Oid index_oid,
int attno)
175 if (rd_rel->relkind != RELKIND_INDEX &&
176 rd_rel->relkind != RELKIND_PARTITIONED_INDEX)
181 amoid = rd_rel->relam;
182 natts = rd_rel->relnatts;
192 if (attno < 0 || attno > natts)
231 Assert(index_oid == rd_index->indexrelid);
232 Assert(attno > 0 && attno <= rd_index->indnatts);
242 && attno > rd_index->indnkeyatts)
250 INDOPTION_DESC, 0, &
res))
257 INDOPTION_DESC, INDOPTION_DESC, &
res))
264 INDOPTION_NULLS_FIRST, INDOPTION_NULLS_FIRST, &
res))
271 INDOPTION_NULLS_FIRST, 0, &
res))
IndexAmRoutine * GetIndexAmRoutineByAmId(Oid amoid, bool noerror)
@ AMPROP_DISTANCE_ORDERABLE
static const struct am_propname am_propnames[]
static Datum indexam_property(FunctionCallInfo fcinfo, const char *propname, Oid amoid, Oid index_oid, int attno)
Datum pg_index_column_has_property(PG_FUNCTION_ARGS)
Datum pg_indexam_progress_phasename(PG_FUNCTION_ARGS)
Datum pg_index_has_property(PG_FUNCTION_ARGS)
Datum pg_indexam_has_property(PG_FUNCTION_ARGS)
static IndexAMProperty lookup_prop_name(const char *name)
static bool test_indoption(HeapTuple tuple, int attno, bool guard, int16 iopt_mask, int16 iopt_expect, bool *res)
#define CStringGetTextDatum(s)
#define Assert(condition)
#define OidIsValid(objectId)
static void PGresult * res
#define PG_GETARG_TEXT_PP(n)
#define PG_GETARG_INT32(n)
#define PG_RETURN_DATUM(x)
#define PG_RETURN_BOOL(x)
#define HeapTupleIsValid(tuple)
void index_close(Relation relation, LOCKMODE lockmode)
bool index_can_return(Relation indexRelation, int attno)
Relation index_open(Oid relationId, LOCKMODE lockmode)
FormData_pg_class * Form_pg_class
FormData_pg_index * Form_pg_index
int pg_strcasecmp(const char *s1, const char *s2)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
ambuildphasename_function ambuildphasename
amgettuple_function amgettuple
amcanreturn_function amcanreturn
amgetbitmap_function amgetbitmap
amproperty_function amproperty
int16 values[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
Datum SysCacheGetAttrNotNull(int cacheId, HeapTuple tup, AttrNumber attributeNumber)
char * text_to_cstring(const text *t)