mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Rename transformRelOptions()'s "namspace" parameter to "nameSpace".
The name "namspace" looks like a typo, but it was presumably meant to avoid using the "namespace" C++ keyword. This commit renames the parameter to "nameSpace" to prevent future confusion while still avoiding the keyword. Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://postgr.es/m/aJJxpfsDfiQ1VbJ5%40nathan
This commit is contained in:
@@ -1164,7 +1164,7 @@ add_local_string_reloption(local_relopts *relopts, const char *name,
|
|||||||
* but we declare them as Datums to avoid including array.h in reloptions.h.
|
* but we declare them as Datums to avoid including array.h in reloptions.h.
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
transformRelOptions(Datum oldOptions, List *defList, const char *namspace,
|
transformRelOptions(Datum oldOptions, List *defList, const char *nameSpace,
|
||||||
const char *const validnsps[], bool acceptOidsOff, bool isReset)
|
const char *const validnsps[], bool acceptOidsOff, bool isReset)
|
||||||
{
|
{
|
||||||
Datum result;
|
Datum result;
|
||||||
@@ -1200,14 +1200,14 @@ transformRelOptions(Datum oldOptions, List *defList, const char *namspace,
|
|||||||
int kw_len;
|
int kw_len;
|
||||||
|
|
||||||
/* ignore if not in the same namespace */
|
/* ignore if not in the same namespace */
|
||||||
if (namspace == NULL)
|
if (nameSpace == NULL)
|
||||||
{
|
{
|
||||||
if (def->defnamespace != NULL)
|
if (def->defnamespace != NULL)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (def->defnamespace == NULL)
|
else if (def->defnamespace == NULL)
|
||||||
continue;
|
continue;
|
||||||
else if (strcmp(def->defnamespace, namspace) != 0)
|
else if (strcmp(def->defnamespace, nameSpace) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
kw_len = strlen(def->defname);
|
kw_len = strlen(def->defname);
|
||||||
@@ -1277,14 +1277,14 @@ transformRelOptions(Datum oldOptions, List *defList, const char *namspace,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ignore if not in the same namespace */
|
/* ignore if not in the same namespace */
|
||||||
if (namspace == NULL)
|
if (nameSpace == NULL)
|
||||||
{
|
{
|
||||||
if (def->defnamespace != NULL)
|
if (def->defnamespace != NULL)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (def->defnamespace == NULL)
|
else if (def->defnamespace == NULL)
|
||||||
continue;
|
continue;
|
||||||
else if (strcmp(def->defnamespace, namspace) != 0)
|
else if (strcmp(def->defnamespace, nameSpace) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -233,7 +233,7 @@ extern void add_local_string_reloption(local_relopts *relopts, const char *name,
|
|||||||
fill_string_relopt filler, int offset);
|
fill_string_relopt filler, int offset);
|
||||||
|
|
||||||
extern Datum transformRelOptions(Datum oldOptions, List *defList,
|
extern Datum transformRelOptions(Datum oldOptions, List *defList,
|
||||||
const char *namspace, const char *const validnsps[],
|
const char *nameSpace, const char *const validnsps[],
|
||||||
bool acceptOidsOff, bool isReset);
|
bool acceptOidsOff, bool isReset);
|
||||||
extern List *untransformRelOptions(Datum options);
|
extern List *untransformRelOptions(Datum options);
|
||||||
extern bytea *extractRelOptions(HeapTuple tuple, TupleDesc tupdesc,
|
extern bytea *extractRelOptions(HeapTuple tuple, TupleDesc tupdesc,
|
||||||
|
Reference in New Issue
Block a user