Commit 80f3b5ad authored by Alvaro Herrera's avatar Alvaro Herrera

Remove unused "caller" argument from stringToQualifiedNameList.

parent d1eaa42f
......@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/regproc.c,v 1.101 2007/06/05 21:31:06 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/regproc.c,v 1.102 2007/06/26 16:48:09 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -35,8 +35,7 @@
#include "utils/lsyscache.h"
#include "utils/syscache.h"
static void parseNameAndArgTypes(const char *string, const char *caller,
bool allowNone,
static void parseNameAndArgTypes(const char *string, bool allowNone,
List **names, int *nargs, Oid *argtypes);
......@@ -127,7 +126,7 @@ regprocin(PG_FUNCTION_ARGS)
* Normal case: parse the name into components and see if it matches any
* pg_proc entries in the current search path.
*/
names = stringToQualifiedNameList(pro_name_or_oid, "regprocin");
names = stringToQualifiedNameList(pro_name_or_oid);
clist = FuncnameGetCandidates(names, -1);
if (clist == NULL)
......@@ -271,8 +270,7 @@ regprocedurein(PG_FUNCTION_ARGS)
* datatype cannot be used for any system column that needs to receive
* data during bootstrap.
*/
parseNameAndArgTypes(pro_name_or_oid, "regprocedurein", false,
&names, &nargs, argtypes);
parseNameAndArgTypes(pro_name_or_oid, false, &names, &nargs, argtypes);
clist = FuncnameGetCandidates(names, nargs);
......@@ -476,7 +474,7 @@ regoperin(PG_FUNCTION_ARGS)
* Normal case: parse the name into components and see if it matches any
* pg_operator entries in the current search path.
*/
names = stringToQualifiedNameList(opr_name_or_oid, "regoperin");
names = stringToQualifiedNameList(opr_name_or_oid);
clist = OpernameGetCandidates(names, '\0');
if (clist == NULL)
......@@ -626,8 +624,7 @@ regoperatorin(PG_FUNCTION_ARGS)
* datatype cannot be used for any system column that needs to receive
* data during bootstrap.
*/
parseNameAndArgTypes(opr_name_or_oid, "regoperatorin", true,
&names, &nargs, argtypes);
parseNameAndArgTypes(opr_name_or_oid, true, &names, &nargs, argtypes);
if (nargs == 1)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_PARAMETER),
......@@ -827,7 +824,7 @@ regclassin(PG_FUNCTION_ARGS)
* Normal case: parse the name into components and see if it matches any
* pg_class entries in the current search path.
*/
names = stringToQualifiedNameList(class_name_or_oid, "regclassin");
names = stringToQualifiedNameList(class_name_or_oid);
result = RangeVarGetRelid(makeRangeVarFromNameList(names), false);
......@@ -1093,7 +1090,7 @@ text_regclass(PG_FUNCTION_ARGS)
* Given a C string, parse it into a qualified-name list.
*/
List *
stringToQualifiedNameList(const char *string, const char *caller)
stringToQualifiedNameList(const char *string)
{
char *rawname;
List *result = NIL;
......@@ -1141,9 +1138,8 @@ stringToQualifiedNameList(const char *string, const char *caller)
* for unary operators).
*/
static void
parseNameAndArgTypes(const char *string, const char *caller,
bool allowNone,
List **names, int *nargs, Oid *argtypes)
parseNameAndArgTypes(const char *string, bool allowNone, List **names,
int *nargs, Oid *argtypes)
{
char *rawname;
char *ptr;
......@@ -1174,7 +1170,7 @@ parseNameAndArgTypes(const char *string, const char *caller,
/* Separate the name and parse it into a list */
*ptr++ = '\0';
*names = stringToQualifiedNameList(rawname, caller);
*names = stringToQualifiedNameList(rawname);
/* Check for the trailing right parenthesis and remove it */
ptr2 = ptr + strlen(ptr);
......
......@@ -7,7 +7,7 @@
* Copyright (c) 2002-2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.35 2007/06/06 23:00:39 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.36 2007/06/26 16:48:09 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -1045,7 +1045,7 @@ RelationNameGetTupleDesc(const char *relname)
List *relname_list;
/* Open relation and copy the tuple description */
relname_list = stringToQualifiedNameList(relname, "RelationNameGetTupleDesc");
relname_list = stringToQualifiedNameList(relname);
relvar = makeRangeVarFromNameList(relname_list);
rel = relation_openrv(relvar, AccessShareLock);
tupdesc = CreateTupleDescCopy(RelationGetDescr(rel));
......
......@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.296 2007/06/06 23:00:46 tgl Exp $
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.297 2007/06/26 16:48:09 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -524,7 +524,7 @@ extern Datum regtypeout(PG_FUNCTION_ARGS);
extern Datum regtyperecv(PG_FUNCTION_ARGS);
extern Datum regtypesend(PG_FUNCTION_ARGS);
extern Datum text_regclass(PG_FUNCTION_ARGS);
extern List *stringToQualifiedNameList(const char *string, const char *caller);
extern List *stringToQualifiedNameList(const char *string);
extern char *format_procedure(Oid procedure_oid);
extern char *format_operator(Oid operator_oid);
......
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.115 2007/06/06 23:00:48 tgl Exp $
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.116 2007/06/26 16:48:09 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -1340,8 +1340,7 @@ plpgsql_parse_tripwordtype(char *word)
memcpy(cp[1], &word[i + 1], (qualified_att_len - i - 1) * sizeof(char));
cp[1][qualified_att_len - i - 1] = '\0';
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp[0],
"plpgsql_parse_tripwordtype"));
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp[0]));
classOid = RangeVarGetRelid(relvar, true);
if (!OidIsValid(classOid))
goto done;
......@@ -1465,7 +1464,7 @@ plpgsql_parse_dblwordrowtype(char *word)
word[i] = '%';
/* Lookup the relation */
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp, "plpgsql_parse_dblwordrowtype"));
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp));
classOid = RangeVarGetRelid(relvar, true);
if (!OidIsValid(classOid))
ereport(ERROR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment