65 (
errmsg(
"new option value for string parameter %s",
79 "Integer option for dummy_index_am",
86 "Real option for dummy_index_am",
93 "Boolean option for dummy_index_am",
100 "Enum option for dummy_index_am",
103 "Valid values are \"one\" and \"two\".",
110 "String option for dummy_index_am with non-NULL default",
116 option_string_val_offset);
129 option_string_null_offset);
203 Cost *indexStartupCost,
Cost *indexTotalCost,
204 Selectivity *indexSelectivity,
double *indexCorrelation,
208 *indexStartupCost = 1.0e10;
209 *indexTotalCost = 1.0e10;
212 *indexSelectivity = 1;
213 *indexCorrelation = 0;
258 ScanKey orderbys,
int norderbys)
280 .
type = T_IndexAmRoutine,
284 .amcanorderbyop =
false,
286 .amconsistentequality =
false,
287 .amconsistentordering =
false,
288 .amcanbackward =
false,
289 .amcanunique =
false,
290 .amcanmulticol =
false,
291 .amoptionalkey =
false,
292 .amsearcharray =
false,
293 .amsearchnulls =
false,
295 .amclusterable =
false,
296 .ampredlocks =
false,
297 .amcanparallel =
false,
298 .amcanbuildparallel =
false,
299 .amcaninclude =
false,
300 .amusemaintenanceworkmem =
false,
301 .amsummarizing =
false,
312 .amgettreeheight = NULL,
315 .ambuildphasename = NULL,
324 .amestimateparallelscan = NULL,
325 .aminitparallelscan = NULL,
326 .amparallelrescan = NULL,
static bool validate(Port *port, const char *auth)
static Datum values[MAXATTR]
static bool divalidate(Oid opclassoid)
static void validate_string_option(const char *value)
static void diendscan(IndexScanDesc scan)
static void dibuildempty(Relation index)
static IndexBuildResult * dibuild(Relation heap, Relation index, IndexInfo *indexInfo)
static relopt_enum_elt_def dummyAmEnumValues[]
PG_FUNCTION_INFO_V1(dihandler)
static void create_reloptions_table(void)
static bytea * dioptions(Datum reloptions, bool validate)
static IndexBulkDeleteResult * dibulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback, void *callback_state)
static IndexScanDesc dibeginscan(Relation r, int nkeys, int norderbys)
static bool diinsert(Relation index, Datum *values, bool *isnull, ItemPointer ht_ctid, Relation heapRel, IndexUniqueCheck checkUnique, bool indexUnchanged, IndexInfo *indexInfo)
static void direscan(IndexScanDesc scan, ScanKey scankey, int nscankeys, ScanKey orderbys, int norderbys)
static IndexBulkDeleteResult * divacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
struct DummyIndexOptions DummyIndexOptions
static void dicostestimate(PlannerInfo *root, IndexPath *path, double loop_count, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, double *indexCorrelation, double *indexPages)
static relopt_parse_elt di_relopt_tab[6]
Datum dihandler(PG_FUNCTION_ARGS)
static relopt_kind di_relopt_kind
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc_object(type)
#define PG_RETURN_POINTER(x)
IndexScanDesc RelationGetIndexScan(Relation indexRelation, int nkeys, int norderbys)
bool(* IndexBulkDeleteCallback)(ItemPointer itemptr, void *state)
#define AccessExclusiveLock
void add_int_reloption(bits32 kinds, const char *name, const char *desc, int default_val, int min_val, int max_val, LOCKMODE lockmode)
void add_string_reloption(bits32 kinds, const char *name, const char *desc, const char *default_val, validate_string_relopt validator, LOCKMODE lockmode)
void add_enum_reloption(bits32 kinds, const char *name, const char *desc, relopt_enum_elt_def *members, int default_val, const char *detailmsg, LOCKMODE lockmode)
void * build_reloptions(Datum reloptions, bool validate, relopt_kind kind, Size relopt_struct_size, const relopt_parse_elt *relopt_elems, int num_relopt_elems)
void add_real_reloption(bits32 kinds, const char *name, const char *desc, double default_val, double min_val, double max_val, LOCKMODE lockmode)
void add_bool_reloption(bits32 kinds, const char *name, const char *desc, bool default_val, LOCKMODE lockmode)
relopt_kind add_reloption_kind(void)
int option_string_val_offset
int option_string_null_offset
static void callback(struct sockaddr *addr, struct sockaddr *mask, void *unused)
#define VACUUM_OPTION_NO_PARALLEL