Remove unused "caller" argument from stringToQualifiedNameList.
This commit is contained in:
parent
d1eaa42fd5
commit
80f3b5ad2e
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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/lsyscache.h"
|
||||||
#include "utils/syscache.h"
|
#include "utils/syscache.h"
|
||||||
|
|
||||||
static void parseNameAndArgTypes(const char *string, const char *caller,
|
static void parseNameAndArgTypes(const char *string, bool allowNone,
|
||||||
bool allowNone,
|
|
||||||
List **names, int *nargs, Oid *argtypes);
|
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
|
* Normal case: parse the name into components and see if it matches any
|
||||||
* pg_proc entries in the current search path.
|
* 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);
|
clist = FuncnameGetCandidates(names, -1);
|
||||||
|
|
||||||
if (clist == NULL)
|
if (clist == NULL)
|
||||||
@ -271,8 +270,7 @@ regprocedurein(PG_FUNCTION_ARGS)
|
|||||||
* datatype cannot be used for any system column that needs to receive
|
* datatype cannot be used for any system column that needs to receive
|
||||||
* data during bootstrap.
|
* data during bootstrap.
|
||||||
*/
|
*/
|
||||||
parseNameAndArgTypes(pro_name_or_oid, "regprocedurein", false,
|
parseNameAndArgTypes(pro_name_or_oid, false, &names, &nargs, argtypes);
|
||||||
&names, &nargs, argtypes);
|
|
||||||
|
|
||||||
clist = FuncnameGetCandidates(names, nargs);
|
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
|
* Normal case: parse the name into components and see if it matches any
|
||||||
* pg_operator entries in the current search path.
|
* 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');
|
clist = OpernameGetCandidates(names, '\0');
|
||||||
|
|
||||||
if (clist == NULL)
|
if (clist == NULL)
|
||||||
@ -626,8 +624,7 @@ regoperatorin(PG_FUNCTION_ARGS)
|
|||||||
* datatype cannot be used for any system column that needs to receive
|
* datatype cannot be used for any system column that needs to receive
|
||||||
* data during bootstrap.
|
* data during bootstrap.
|
||||||
*/
|
*/
|
||||||
parseNameAndArgTypes(opr_name_or_oid, "regoperatorin", true,
|
parseNameAndArgTypes(opr_name_or_oid, true, &names, &nargs, argtypes);
|
||||||
&names, &nargs, argtypes);
|
|
||||||
if (nargs == 1)
|
if (nargs == 1)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_UNDEFINED_PARAMETER),
|
(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
|
* Normal case: parse the name into components and see if it matches any
|
||||||
* pg_class entries in the current search path.
|
* 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);
|
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.
|
* Given a C string, parse it into a qualified-name list.
|
||||||
*/
|
*/
|
||||||
List *
|
List *
|
||||||
stringToQualifiedNameList(const char *string, const char *caller)
|
stringToQualifiedNameList(const char *string)
|
||||||
{
|
{
|
||||||
char *rawname;
|
char *rawname;
|
||||||
List *result = NIL;
|
List *result = NIL;
|
||||||
@ -1141,9 +1138,8 @@ stringToQualifiedNameList(const char *string, const char *caller)
|
|||||||
* for unary operators).
|
* for unary operators).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
parseNameAndArgTypes(const char *string, const char *caller,
|
parseNameAndArgTypes(const char *string, bool allowNone, List **names,
|
||||||
bool allowNone,
|
int *nargs, Oid *argtypes)
|
||||||
List **names, int *nargs, Oid *argtypes)
|
|
||||||
{
|
{
|
||||||
char *rawname;
|
char *rawname;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
@ -1174,7 +1170,7 @@ parseNameAndArgTypes(const char *string, const char *caller,
|
|||||||
|
|
||||||
/* Separate the name and parse it into a list */
|
/* Separate the name and parse it into a list */
|
||||||
*ptr++ = '\0';
|
*ptr++ = '\0';
|
||||||
*names = stringToQualifiedNameList(rawname, caller);
|
*names = stringToQualifiedNameList(rawname);
|
||||||
|
|
||||||
/* Check for the trailing right parenthesis and remove it */
|
/* Check for the trailing right parenthesis and remove it */
|
||||||
ptr2 = ptr + strlen(ptr);
|
ptr2 = ptr + strlen(ptr);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Copyright (c) 2002-2007, PostgreSQL Global Development Group
|
* Copyright (c) 2002-2007, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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;
|
List *relname_list;
|
||||||
|
|
||||||
/* Open relation and copy the tuple description */
|
/* Open relation and copy the tuple description */
|
||||||
relname_list = stringToQualifiedNameList(relname, "RelationNameGetTupleDesc");
|
relname_list = stringToQualifiedNameList(relname);
|
||||||
relvar = makeRangeVarFromNameList(relname_list);
|
relvar = makeRangeVarFromNameList(relname_list);
|
||||||
rel = relation_openrv(relvar, AccessShareLock);
|
rel = relation_openrv(relvar, AccessShareLock);
|
||||||
tupdesc = CreateTupleDescCopy(RelationGetDescr(rel));
|
tupdesc = CreateTupleDescCopy(RelationGetDescr(rel));
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* 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 regtyperecv(PG_FUNCTION_ARGS);
|
||||||
extern Datum regtypesend(PG_FUNCTION_ARGS);
|
extern Datum regtypesend(PG_FUNCTION_ARGS);
|
||||||
extern Datum text_regclass(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_procedure(Oid procedure_oid);
|
||||||
extern char *format_operator(Oid operator_oid);
|
extern char *format_operator(Oid operator_oid);
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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));
|
memcpy(cp[1], &word[i + 1], (qualified_att_len - i - 1) * sizeof(char));
|
||||||
cp[1][qualified_att_len - i - 1] = '\0';
|
cp[1][qualified_att_len - i - 1] = '\0';
|
||||||
|
|
||||||
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp[0],
|
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp[0]));
|
||||||
"plpgsql_parse_tripwordtype"));
|
|
||||||
classOid = RangeVarGetRelid(relvar, true);
|
classOid = RangeVarGetRelid(relvar, true);
|
||||||
if (!OidIsValid(classOid))
|
if (!OidIsValid(classOid))
|
||||||
goto done;
|
goto done;
|
||||||
@ -1465,7 +1464,7 @@ plpgsql_parse_dblwordrowtype(char *word)
|
|||||||
word[i] = '%';
|
word[i] = '%';
|
||||||
|
|
||||||
/* Lookup the relation */
|
/* Lookup the relation */
|
||||||
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp, "plpgsql_parse_dblwordrowtype"));
|
relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp));
|
||||||
classOid = RangeVarGetRelid(relvar, true);
|
classOid = RangeVarGetRelid(relvar, true);
|
||||||
if (!OidIsValid(classOid))
|
if (!OidIsValid(classOid))
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user