diff options
Diffstat (limited to 'src/backend/access/common')
-rw-r--r-- | src/backend/access/common/heaptuple.c | 6 | ||||
-rw-r--r-- | src/backend/access/common/printtup.c | 6 | ||||
-rw-r--r-- | src/backend/access/common/reloptions.c | 64 |
3 files changed, 38 insertions, 38 deletions
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index d3b06d8ae63..d0f4b3d3825 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -16,7 +16,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.110 2006/07/14 14:52:16 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.111 2006/10/04 00:29:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1294,7 +1294,7 @@ slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull) { if (tuple == NULL) /* internal error */ elog(ERROR, "cannot extract system attribute from virtual tuple"); - if (slot->tts_mintuple) /* internal error */ + if (slot->tts_mintuple) /* internal error */ elog(ERROR, "cannot extract system attribute from minimal tuple"); return heap_getsysattr(tuple, attnum, tupleDesc, isnull); } @@ -1480,7 +1480,7 @@ slot_attisnull(TupleTableSlot *slot, int attnum) { if (tuple == NULL) /* internal error */ elog(ERROR, "cannot extract system attribute from virtual tuple"); - if (slot->tts_mintuple) /* internal error */ + if (slot->tts_mintuple) /* internal error */ elog(ERROR, "cannot extract system attribute from minimal tuple"); return heap_attisnull(tuple, attnum); } diff --git a/src/backend/access/common/printtup.c b/src/backend/access/common/printtup.c index 82117e5fe6e..ab2d8b4771d 100644 --- a/src/backend/access/common/printtup.c +++ b/src/backend/access/common/printtup.c @@ -9,7 +9,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/common/printtup.c,v 1.98 2006/08/12 02:52:03 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/common/printtup.c,v 1.99 2006/10/04 00:29:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -127,8 +127,8 @@ printtup_startup(DestReceiver *self, int operation, TupleDesc typeinfo) } /* - * If we are supposed to emit row descriptions, - * then send the tuple descriptor of the tuples. + * If we are supposed to emit row descriptions, then send the tuple + * descriptor of the tuples. */ if (myState->sendDescrip) SendRowDescriptionMessage(typeinfo, diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index 8506070f101..0bcda36c06a 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/common/reloptions.c,v 1.1 2006/07/03 22:45:36 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/common/reloptions.c,v 1.2 2006/10/04 00:29:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ transformRelOptions(Datum oldOptions, List *defList, /* Copy any oldOptions that aren't to be replaced */ if (oldOptions != (Datum) 0) { - ArrayType *array = DatumGetArrayTypeP(oldOptions); + ArrayType *array = DatumGetArrayTypeP(oldOptions); Datum *oldoptions; int noldoptions; int i; @@ -71,15 +71,15 @@ transformRelOptions(Datum oldOptions, List *defList, for (i = 0; i < noldoptions; i++) { - text *oldoption = DatumGetTextP(oldoptions[i]); - char *text_str = (char *) VARATT_DATA(oldoption); - int text_len = VARATT_SIZE(oldoption) - VARHDRSZ; + text *oldoption = DatumGetTextP(oldoptions[i]); + char *text_str = (char *) VARATT_DATA(oldoption); + int text_len = VARATT_SIZE(oldoption) - VARHDRSZ; /* Search for a match in defList */ foreach(cell, defList) { - DefElem *def = lfirst(cell); - int kw_len = strlen(def->defname); + DefElem *def = lfirst(cell); + int kw_len = strlen(def->defname); if (text_len > kw_len && text_str[kw_len] == '=' && pg_strncasecmp(text_str, def->defname, kw_len) == 0) @@ -96,33 +96,33 @@ transformRelOptions(Datum oldOptions, List *defList, } /* - * If CREATE/SET, add new options to array; if RESET, just check that - * the user didn't say RESET (option=val). (Must do this because the - * grammar doesn't enforce it.) + * If CREATE/SET, add new options to array; if RESET, just check that the + * user didn't say RESET (option=val). (Must do this because the grammar + * doesn't enforce it.) */ foreach(cell, defList) { - DefElem *def = lfirst(cell); + DefElem *def = lfirst(cell); if (isReset) { if (def->arg != NULL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("RESET must not include values for parameters"))); + errmsg("RESET must not include values for parameters"))); } else { - text *t; + text *t; const char *value; - Size len; + Size len; if (ignoreOids && pg_strcasecmp(def->defname, "oids") == 0) continue; /* - * Flatten the DefElem into a text string like "name=arg". - * If we have just "name", assume "name=true" is meant. + * Flatten the DefElem into a text string like "name=arg". If we + * have just "name", assume "name=true" is meant. */ if (def->arg != NULL) value = defGetString(def); @@ -163,10 +163,10 @@ transformRelOptions(Datum oldOptions, List *defList, * containing the corresponding value, or NULL if the keyword does not appear. */ void -parseRelOptions(Datum options, int numkeywords, const char * const *keywords, +parseRelOptions(Datum options, int numkeywords, const char *const * keywords, char **values, bool validate) { - ArrayType *array; + ArrayType *array; Datum *optiondatums; int noptions; int i; @@ -187,21 +187,21 @@ parseRelOptions(Datum options, int numkeywords, const char * const *keywords, for (i = 0; i < noptions; i++) { - text *optiontext = DatumGetTextP(optiondatums[i]); - char *text_str = (char *) VARATT_DATA(optiontext); - int text_len = VARATT_SIZE(optiontext) - VARHDRSZ; - int j; + text *optiontext = DatumGetTextP(optiondatums[i]); + char *text_str = (char *) VARATT_DATA(optiontext); + int text_len = VARATT_SIZE(optiontext) - VARHDRSZ; + int j; /* Search for a match in keywords */ for (j = 0; j < numkeywords; j++) { - int kw_len = strlen(keywords[j]); + int kw_len = strlen(keywords[j]); if (text_len > kw_len && text_str[kw_len] == '=' && pg_strncasecmp(text_str, keywords[j], kw_len) == 0) { - char *value; - int value_len; + char *value; + int value_len; if (values[j] && validate) ereport(ERROR, @@ -218,8 +218,8 @@ parseRelOptions(Datum options, int numkeywords, const char * const *keywords, } if (j >= numkeywords && validate) { - char *s; - char *p; + char *s; + char *p; s = DatumGetCString(DirectFunctionCall1(textout, optiondatums[i])); p = strchr(s, '='); @@ -240,17 +240,17 @@ bytea * default_reloptions(Datum reloptions, bool validate, int minFillfactor, int defaultFillfactor) { - static const char * const default_keywords[1] = { "fillfactor" }; - char *values[1]; - int32 fillfactor; + static const char *const default_keywords[1] = {"fillfactor"}; + char *values[1]; + int32 fillfactor; StdRdOptions *result; parseRelOptions(reloptions, 1, default_keywords, values, validate); /* * If no options, we can just return NULL rather than doing anything. - * (defaultFillfactor is thus not used, but we require callers to pass - * it anyway since we would need it if more options were added.) + * (defaultFillfactor is thus not used, but we require callers to pass it + * anyway since we would need it if more options were added.) */ if (values[0] == NULL) return NULL; |