8
8
*
9
9
*
10
10
* 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 $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -175,7 +175,7 @@ static relopt_real realRelOpts[] =
175
175
{ { NULL } }
176
176
};
177
177
178
- static relopt_string stringRelOpts [] =
178
+ static relopt_string stringRelOpts [] =
179
179
{
180
180
/* list terminator */
181
181
{ { NULL } }
@@ -739,7 +739,7 @@ extractRelOptions(HeapTuple tuple, TupleDesc tupdesc, Oid amoptions)
739
739
options = NULL ; /* keep compiler quiet */
740
740
break ;
741
741
}
742
-
742
+
743
743
return options ;
744
744
}
745
745
@@ -972,16 +972,17 @@ allocateReloptStruct(Size base, relopt_value *options, int numoptions)
972
972
* struct (previously allocated with allocateReloptStruct) with the parsed
973
973
* values.
974
974
*
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
- * of elements to be parsed. Note that when validate is true, it is expected
979
- * that all options are 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, of length numelems, is the table describing the allowed options.
979
+ * When validate is true, it is expected that all options appear in elems.
980
980
*/
981
981
void
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 )
985
986
{
986
987
int i ;
987
988
int offset = basesize ;
@@ -1044,7 +1045,7 @@ fillRelOptions(void *rdopts, Size basesize, relopt_value *options,
1044
1045
}
1045
1046
}
1046
1047
if (validate && !found )
1047
- elog (ERROR , "storate parameter \"%s\" not found in parse table" ,
1048
+ elog (ERROR , "reloption \"%s\" not found in parse table" ,
1048
1049
options [i ].gen -> name );
1049
1050
}
1050
1051
SET_VARSIZE (rdopts , offset );
@@ -1061,7 +1062,7 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
1061
1062
relopt_value * options ;
1062
1063
StdRdOptions * rdopts ;
1063
1064
int numoptions ;
1064
- relopt_parse_elt tab [] = {
1065
+ static const relopt_parse_elt tab [] = {
1065
1066
{"fillfactor" , RELOPT_TYPE_INT , offsetof(StdRdOptions , fillfactor )},
1066
1067
{"autovacuum_enabled" , RELOPT_TYPE_BOOL ,
1067
1068
offsetof(StdRdOptions , autovacuum ) + offsetof(AutoVacOpts , enabled )},
0 commit comments