#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);
* 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)
* 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);
* 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)
* 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),
* 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);
* 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;
* 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;
/* 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);
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;
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,