Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 80f3b5a

Browse files
committed
Remove unused "caller" argument from stringToQualifiedNameList.
1 parent d1eaa42 commit 80f3b5a

File tree

4 files changed

+18
-23
lines changed

4 files changed

+18
-23
lines changed

src/backend/utils/adt/regproc.c

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*
1515
* 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 $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -35,8 +35,7 @@
3535
#include "utils/lsyscache.h"
3636
#include "utils/syscache.h"
3737

38-
static void parseNameAndArgTypes(const char *string, const char *caller,
39-
bool allowNone,
38+
static void parseNameAndArgTypes(const char *string, bool allowNone,
4039
List **names, int *nargs, Oid *argtypes);
4140

4241

@@ -127,7 +126,7 @@ regprocin(PG_FUNCTION_ARGS)
127126
* Normal case: parse the name into components and see if it matches any
128127
* pg_proc entries in the current search path.
129128
*/
130-
names = stringToQualifiedNameList(pro_name_or_oid, "regprocin");
129+
names = stringToQualifiedNameList(pro_name_or_oid);
131130
clist = FuncnameGetCandidates(names, -1);
132131

133132
if (clist == NULL)
@@ -271,8 +270,7 @@ regprocedurein(PG_FUNCTION_ARGS)
271270
* datatype cannot be used for any system column that needs to receive
272271
* data during bootstrap.
273272
*/
274-
parseNameAndArgTypes(pro_name_or_oid, "regprocedurein", false,
275-
&names, &nargs, argtypes);
273+
parseNameAndArgTypes(pro_name_or_oid, false, &names, &nargs, argtypes);
276274

277275
clist = FuncnameGetCandidates(names, nargs);
278276

@@ -476,7 +474,7 @@ regoperin(PG_FUNCTION_ARGS)
476474
* Normal case: parse the name into components and see if it matches any
477475
* pg_operator entries in the current search path.
478476
*/
479-
names = stringToQualifiedNameList(opr_name_or_oid, "regoperin");
477+
names = stringToQualifiedNameList(opr_name_or_oid);
480478
clist = OpernameGetCandidates(names, '\0');
481479

482480
if (clist == NULL)
@@ -626,8 +624,7 @@ regoperatorin(PG_FUNCTION_ARGS)
626624
* datatype cannot be used for any system column that needs to receive
627625
* data during bootstrap.
628626
*/
629-
parseNameAndArgTypes(opr_name_or_oid, "regoperatorin", true,
630-
&names, &nargs, argtypes);
627+
parseNameAndArgTypes(opr_name_or_oid, true, &names, &nargs, argtypes);
631628
if (nargs == 1)
632629
ereport(ERROR,
633630
(errcode(ERRCODE_UNDEFINED_PARAMETER),
@@ -827,7 +824,7 @@ regclassin(PG_FUNCTION_ARGS)
827824
* Normal case: parse the name into components and see if it matches any
828825
* pg_class entries in the current search path.
829826
*/
830-
names = stringToQualifiedNameList(class_name_or_oid, "regclassin");
827+
names = stringToQualifiedNameList(class_name_or_oid);
831828

832829
result = RangeVarGetRelid(makeRangeVarFromNameList(names), false);
833830

@@ -1093,7 +1090,7 @@ text_regclass(PG_FUNCTION_ARGS)
10931090
* Given a C string, parse it into a qualified-name list.
10941091
*/
10951092
List *
1096-
stringToQualifiedNameList(const char *string, const char *caller)
1093+
stringToQualifiedNameList(const char *string)
10971094
{
10981095
char *rawname;
10991096
List *result = NIL;
@@ -1141,9 +1138,8 @@ stringToQualifiedNameList(const char *string, const char *caller)
11411138
* for unary operators).
11421139
*/
11431140
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)
11471143
{
11481144
char *rawname;
11491145
char *ptr;
@@ -1174,7 +1170,7 @@ parseNameAndArgTypes(const char *string, const char *caller,
11741170

11751171
/* Separate the name and parse it into a list */
11761172
*ptr++ = '\0';
1177-
*names = stringToQualifiedNameList(rawname, caller);
1173+
*names = stringToQualifiedNameList(rawname);
11781174

11791175
/* Check for the trailing right parenthesis and remove it */
11801176
ptr2 = ptr + strlen(ptr);

src/backend/utils/fmgr/funcapi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2002-2007, PostgreSQL Global Development Group
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.35 2007/06/06 23:00:39 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.36 2007/06/26 16:48:09 alvherre Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1045,7 +1045,7 @@ RelationNameGetTupleDesc(const char *relname)
10451045
List *relname_list;
10461046

10471047
/* Open relation and copy the tuple description */
1048-
relname_list = stringToQualifiedNameList(relname, "RelationNameGetTupleDesc");
1048+
relname_list = stringToQualifiedNameList(relname);
10491049
relvar = makeRangeVarFromNameList(relname_list);
10501050
rel = relation_openrv(relvar, AccessShareLock);
10511051
tupdesc = CreateTupleDescCopy(RelationGetDescr(rel));

src/include/utils/builtins.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.296 2007/06/06 23:00:46 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.297 2007/06/26 16:48:09 alvherre Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -524,7 +524,7 @@ extern Datum regtypeout(PG_FUNCTION_ARGS);
524524
extern Datum regtyperecv(PG_FUNCTION_ARGS);
525525
extern Datum regtypesend(PG_FUNCTION_ARGS);
526526
extern Datum text_regclass(PG_FUNCTION_ARGS);
527-
extern List *stringToQualifiedNameList(const char *string, const char *caller);
527+
extern List *stringToQualifiedNameList(const char *string);
528528
extern char *format_procedure(Oid procedure_oid);
529529
extern char *format_operator(Oid operator_oid);
530530

src/pl/plpgsql/src/pl_comp.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.115 2007/06/06 23:00:48 tgl Exp $
11+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.116 2007/06/26 16:48:09 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1340,8 +1340,7 @@ plpgsql_parse_tripwordtype(char *word)
13401340
memcpy(cp[1], &word[i + 1], (qualified_att_len - i - 1) * sizeof(char));
13411341
cp[1][qualified_att_len - i - 1] = '\0';
13421342

1343-
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp[0],
1344-
"plpgsql_parse_tripwordtype"));
1343+
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp[0]));
13451344
classOid = RangeVarGetRelid(relvar, true);
13461345
if (!OidIsValid(classOid))
13471346
goto done;
@@ -1465,7 +1464,7 @@ plpgsql_parse_dblwordrowtype(char *word)
14651464
word[i] = '%';
14661465

14671466
/* Lookup the relation */
1468-
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp, "plpgsql_parse_dblwordrowtype"));
1467+
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp));
14691468
classOid = RangeVarGetRelid(relvar, true);
14701469
if (!OidIsValid(classOid))
14711470
ereport(ERROR,

0 commit comments

Comments
 (0)