|
13 | 13 | *
|
14 | 14 | *
|
15 | 15 | * IDENTIFICATION
|
16 |
| - * $PostgreSQL: pgsql/src/backend/utils/adt/regproc.c,v 1.101 2007/06/05 21:31:06 tgl Exp $ |
| 16 | + * $PostgreSQL: pgsql/src/backend/utils/adt/regproc.c,v 1.102 2007/06/26 16:48:09 alvherre Exp $ |
17 | 17 | *
|
18 | 18 | *-------------------------------------------------------------------------
|
19 | 19 | */
|
|
35 | 35 | #include "utils/lsyscache.h"
|
36 | 36 | #include "utils/syscache.h"
|
37 | 37 |
|
38 |
| -static void parseNameAndArgTypes(const char *string, const char *caller, |
39 |
| - bool allowNone, |
| 38 | +static void parseNameAndArgTypes(const char *string, bool allowNone, |
40 | 39 | List **names, int *nargs, Oid *argtypes);
|
41 | 40 |
|
42 | 41 |
|
@@ -127,7 +126,7 @@ regprocin(PG_FUNCTION_ARGS)
|
127 | 126 | * Normal case: parse the name into components and see if it matches any
|
128 | 127 | * pg_proc entries in the current search path.
|
129 | 128 | */
|
130 |
| - names = stringToQualifiedNameList(pro_name_or_oid, "regprocin"); |
| 129 | + names = stringToQualifiedNameList(pro_name_or_oid); |
131 | 130 | clist = FuncnameGetCandidates(names, -1);
|
132 | 131 |
|
133 | 132 | if (clist == NULL)
|
@@ -271,8 +270,7 @@ regprocedurein(PG_FUNCTION_ARGS)
|
271 | 270 | * datatype cannot be used for any system column that needs to receive
|
272 | 271 | * data during bootstrap.
|
273 | 272 | */
|
274 |
| - parseNameAndArgTypes(pro_name_or_oid, "regprocedurein", false, |
275 |
| - &names, &nargs, argtypes); |
| 273 | + parseNameAndArgTypes(pro_name_or_oid, false, &names, &nargs, argtypes); |
276 | 274 |
|
277 | 275 | clist = FuncnameGetCandidates(names, nargs);
|
278 | 276 |
|
@@ -476,7 +474,7 @@ regoperin(PG_FUNCTION_ARGS)
|
476 | 474 | * Normal case: parse the name into components and see if it matches any
|
477 | 475 | * pg_operator entries in the current search path.
|
478 | 476 | */
|
479 |
| - names = stringToQualifiedNameList(opr_name_or_oid, "regoperin"); |
| 477 | + names = stringToQualifiedNameList(opr_name_or_oid); |
480 | 478 | clist = OpernameGetCandidates(names, '\0');
|
481 | 479 |
|
482 | 480 | if (clist == NULL)
|
@@ -626,8 +624,7 @@ regoperatorin(PG_FUNCTION_ARGS)
|
626 | 624 | * datatype cannot be used for any system column that needs to receive
|
627 | 625 | * data during bootstrap.
|
628 | 626 | */
|
629 |
| - parseNameAndArgTypes(opr_name_or_oid, "regoperatorin", true, |
630 |
| - &names, &nargs, argtypes); |
| 627 | + parseNameAndArgTypes(opr_name_or_oid, true, &names, &nargs, argtypes); |
631 | 628 | if (nargs == 1)
|
632 | 629 | ereport(ERROR,
|
633 | 630 | (errcode(ERRCODE_UNDEFINED_PARAMETER),
|
@@ -827,7 +824,7 @@ regclassin(PG_FUNCTION_ARGS)
|
827 | 824 | * Normal case: parse the name into components and see if it matches any
|
828 | 825 | * pg_class entries in the current search path.
|
829 | 826 | */
|
830 |
| - names = stringToQualifiedNameList(class_name_or_oid, "regclassin"); |
| 827 | + names = stringToQualifiedNameList(class_name_or_oid); |
831 | 828 |
|
832 | 829 | result = RangeVarGetRelid(makeRangeVarFromNameList(names), false);
|
833 | 830 |
|
@@ -1093,7 +1090,7 @@ text_regclass(PG_FUNCTION_ARGS)
|
1093 | 1090 | * Given a C string, parse it into a qualified-name list.
|
1094 | 1091 | */
|
1095 | 1092 | List *
|
1096 |
| -stringToQualifiedNameList(const char *string, const char *caller) |
| 1093 | +stringToQualifiedNameList(const char *string) |
1097 | 1094 | {
|
1098 | 1095 | char *rawname;
|
1099 | 1096 | List *result = NIL;
|
@@ -1141,9 +1138,8 @@ stringToQualifiedNameList(const char *string, const char *caller)
|
1141 | 1138 | * for unary operators).
|
1142 | 1139 | */
|
1143 | 1140 | static void
|
1144 |
| -parseNameAndArgTypes(const char *string, const char *caller, |
1145 |
| - bool allowNone, |
1146 |
| - List **names, int *nargs, Oid *argtypes) |
| 1141 | +parseNameAndArgTypes(const char *string, bool allowNone, List **names, |
| 1142 | + int *nargs, Oid *argtypes) |
1147 | 1143 | {
|
1148 | 1144 | char *rawname;
|
1149 | 1145 | char *ptr;
|
@@ -1174,7 +1170,7 @@ parseNameAndArgTypes(const char *string, const char *caller,
|
1174 | 1170 |
|
1175 | 1171 | /* Separate the name and parse it into a list */
|
1176 | 1172 | *ptr++ = '\0';
|
1177 |
| - *names = stringToQualifiedNameList(rawname, caller); |
| 1173 | + *names = stringToQualifiedNameList(rawname); |
1178 | 1174 |
|
1179 | 1175 | /* Check for the trailing right parenthesis and remove it */
|
1180 | 1176 | ptr2 = ptr + strlen(ptr);
|
|
0 commit comments