/* kinds supported by reloptions */ typedefenum relopt_kind
{
RELOPT_KIND_LOCAL = 0,
RELOPT_KIND_HEAP = (1 << 0),
RELOPT_KIND_TOAST = (1 << 1),
RELOPT_KIND_BTREE = (1 << 2),
RELOPT_KIND_HASH = (1 << 3),
RELOPT_KIND_GIN = (1 << 4),
RELOPT_KIND_GIST = (1 << 5),
RELOPT_KIND_ATTRIBUTE = (1 << 6),
RELOPT_KIND_TABLESPACE = (1 << 7),
RELOPT_KIND_SPGIST = (1 << 8),
RELOPT_KIND_VIEW = (1 << 9),
RELOPT_KIND_BRIN = (1 << 10),
RELOPT_KIND_PARTITIONED = (1 << 11), /* if you add a new kind, make sure you update "last_default" too */
RELOPT_KIND_LAST_DEFAULT = RELOPT_KIND_PARTITIONED, /* some compilers treat enums as signed ints, so we can't use 1 << 31 */
RELOPT_KIND_MAX = (1 << 30)
} relopt_kind;
/* reloption namespaces allowed for heaps -- currently only TOAST */ #define HEAP_RELOPT_NAMESPACES { "toast", NULL }
/* generic struct to hold shared data */ typedefstruct relopt_gen
{ constchar *name; /* must be first (used as list termination
* marker) */ constchar *desc;
bits32 kinds;
LOCKMODE lockmode; int namelen;
relopt_type type;
} relopt_gen;
/* holds a parsed value */ typedefstruct relopt_value
{
relopt_gen *gen; bool isset; union
{ bool bool_val; int int_val; double real_val; int enum_val; char *string_val; /* allocated separately */
} values;
} relopt_value;
/* reloptions records for specific variable types */ typedefstruct relopt_bool
{
relopt_gen gen; bool default_val;
} relopt_bool;
typedefstruct relopt_int
{
relopt_gen gen; int default_val; int min; int max;
} relopt_int;
/* This is the table datatype for build_reloptions() */ typedefstruct
{ constchar *optname; /* option's name */
relopt_type opttype; /* option's datatype */ int offset; /* offset of field in result struct */
/* Local reloption definition */ typedefstruct local_relopt
{
relopt_gen *option; /* option definition */ int offset; /* offset of parsed value in bytea structure */
} local_relopt;
/* Structure to hold local reloption data for build_local_reloptions() */ typedefstruct local_relopts
{
List *options; /* list of local_relopt definitions */
List *validators; /* list of relopts_validator callbacks */
Size relopt_struct_size; /* size of parsed bytea structure */
} local_relopts;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.