88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/access/common/reloptions.c,v 1.22 2009/02/28 00:10:51 tgl Exp $
11+ * $PostgreSQL: pgsql/src/backend/access/common/reloptions.c,v 1.23 2009/03/23 16:36:27 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -175,7 +175,7 @@ static relopt_real realRelOpts[] =
175175{ {NULL } }
176176};
177177
178- static relopt_string stringRelOpts []=
178+ static relopt_string stringRelOpts []=
179179{
180180/* list terminator */
181181{ {NULL } }
@@ -739,7 +739,7 @@ extractRelOptions(HeapTuple tuple, TupleDesc tupdesc, Oid amoptions)
739739options = NULL ;/* keep compiler quiet */
740740break ;
741741}
742-
742+
743743return options ;
744744}
745745
@@ -972,16 +972,17 @@ allocateReloptStruct(Size base, relopt_value *options, int numoptions)
972972 * struct (previously allocated with allocateReloptStruct) with the parsed
973973 * values.
974974 *
975- * rdopts is the pointer to the allocated struct to be filled; basesize is
976- * the sizeof(struct) that was passed to allocateReloptStruct. options and
977- * numoptions are parseRelOptions' output. elems and numelems is the array
978- * ofelements to be parsed. Note that when validate is true, it is expected
979- * that all optionsare also in elems.
975+ * rdopts is the pointer to the allocated struct to be filled.
976+ *basesize is the sizeof(struct) that was passed to allocateReloptStruct.
977+ *options, of length numoptions, is parseRelOptions' output.
978+ *elems, oflength numelems, is the table describing the allowed options.
979+ *When validate is true, it is expected that all optionsappear in elems.
980980 */
981981void
982- fillRelOptions (void * rdopts ,Size basesize ,relopt_value * options ,
983- int numoptions ,bool validate ,relopt_parse_elt * elems ,
984- int numelems )
982+ fillRelOptions (void * rdopts ,Size basesize ,
983+ relopt_value * options ,int numoptions ,
984+ bool validate ,
985+ const relopt_parse_elt * elems ,int numelems )
985986{
986987int i ;
987988int offset = basesize ;
@@ -1044,7 +1045,7 @@ fillRelOptions(void *rdopts, Size basesize, relopt_value *options,
10441045}
10451046}
10461047if (validate && !found )
1047- elog (ERROR ,"storate parameter \"%s\" not found in parse table" ,
1048+ elog (ERROR ,"reloption \"%s\" not found in parse table" ,
10481049options [i ].gen -> name );
10491050}
10501051SET_VARSIZE (rdopts ,offset );
@@ -1061,7 +1062,7 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
10611062relopt_value * options ;
10621063StdRdOptions * rdopts ;
10631064int numoptions ;
1064- relopt_parse_elt tab []= {
1065+ static const relopt_parse_elt tab []= {
10651066{"fillfactor" ,RELOPT_TYPE_INT , offsetof(StdRdOptions ,fillfactor )},
10661067{"autovacuum_enabled" ,RELOPT_TYPE_BOOL ,
10671068offsetof(StdRdOptions ,autovacuum )+ offsetof(AutoVacOpts ,enabled )},