diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-07-03 22:45:41 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-07-03 22:45:41 +0000 |
commit | b7b78d24f7fc8d621af40b2e404b6a3f3420e89e (patch) | |
tree | da6b05ca5779ad812557b5d4cd38be79bf524825 /src/include/access/reloptions.h | |
parent | feed07350b63e32ba2fbe50181df7d40ca2ee33e (diff) | |
download | postgresql-b7b78d24f7fc8d621af40b2e404b6a3f3420e89e.tar.gz postgresql-b7b78d24f7fc8d621af40b2e404b6a3f3420e89e.zip |
Code review for FILLFACTOR patch. Change WITH grammar as per earlier
discussion (including making def_arg allow reserved words), add missed
opt_definition for UNIQUE case. Put the reloptions support code in a less
random place (I chose to make a new file access/common/reloptions.c).
Eliminate header inclusion creep. Make the index options functions safely
user-callable (seems like client apps might like to be able to test validity
of options before trying to make an index). Reduce overhead for normal case
with no options by allowing rd_options to be NULL. Fix some unmaintainably
klugy code, including getting rid of Natts_pg_class_fixed at long last.
Some stylistic cleanup too, and pay attention to keeping comments in sync
with code.
Documentation still needs work, though I did fix the omissions in
catalogs.sgml and indexam.sgml.
Diffstat (limited to 'src/include/access/reloptions.h')
-rw-r--r-- | src/include/access/reloptions.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/include/access/reloptions.h b/src/include/access/reloptions.h new file mode 100644 index 00000000000..82474f4707a --- /dev/null +++ b/src/include/access/reloptions.h @@ -0,0 +1,38 @@ +/*------------------------------------------------------------------------- + * + * reloptions.h + * Core support for relation options (pg_class.reloptions) + * + * Note: the functions dealing with text-array reloptions values declare + * them as Datum, not ArrayType *, to avoid needing to include array.h + * into a lot of low-level code. + * + * + * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * $PostgreSQL: pgsql/src/include/access/reloptions.h,v 1.1 2006/07/03 22:45:40 tgl Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef RELOPTIONS_H +#define RELOPTIONS_H + +#include "nodes/pg_list.h" + +extern Datum transformRelOptions(Datum oldOptions, List *defList, + bool ignoreOids, bool isReset); + +extern void parseRelOptions(Datum options, int numkeywords, + const char * const *keywords, + char **values, bool validate); + +extern bytea *default_reloptions(Datum reloptions, bool validate, + int minFillfactor, int defaultFillfactor); + +extern bytea *heap_reloptions(char relkind, Datum reloptions, bool validate); + +extern bytea *index_reloptions(RegProcedure amoptions, Datum reloptions, + bool validate); + +#endif /* RELOPTIONS_H */ |