Index: src/backend/utils/adt/regproc.c
===================================================================
RCS file: /home/alvherre/Code/cvs/pgsql/src/backend/utils/adt/regproc.c,v
retrieving revision 1.101
diff -c -p -r1.101 regproc.c
*** src/backend/utils/adt/regproc.c	5 Jun 2007 21:31:06 -0000	1.101
--- src/backend/utils/adt/regproc.c	25 Jun 2007 17:09:54 -0000
***************
*** 35,42 ****
  #include "utils/lsyscache.h"
  #include "utils/syscache.h"
  
! static void parseNameAndArgTypes(const char *string, const char *caller,
! 					 bool allowNone,
  					 List **names, int *nargs, Oid *argtypes);
  
  
--- 35,41 ----
  #include "utils/lsyscache.h"
  #include "utils/syscache.h"
  
! static void parseNameAndArgTypes(const char *string, bool allowNone,
  					 List **names, int *nargs, Oid *argtypes);
  
  
*************** regprocin(PG_FUNCTION_ARGS)
*** 127,133 ****
  	 * 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");
  	clist = FuncnameGetCandidates(names, -1);
  
  	if (clist == NULL)
--- 126,132 ----
  	 * 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);
  	clist = FuncnameGetCandidates(names, -1);
  
  	if (clist == NULL)
*************** regprocedurein(PG_FUNCTION_ARGS)
*** 271,278 ****
  	 * 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);
  
  	clist = FuncnameGetCandidates(names, nargs);
  
--- 270,276 ----
  	 * datatype cannot be used for any system column that needs to receive
  	 * data during bootstrap.
  	 */
! 	parseNameAndArgTypes(pro_name_or_oid, false, &names, &nargs, argtypes);
  
  	clist = FuncnameGetCandidates(names, nargs);
  
*************** regoperin(PG_FUNCTION_ARGS)
*** 476,482 ****
  	 * 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");
  	clist = OpernameGetCandidates(names, '\0');
  
  	if (clist == NULL)
--- 474,480 ----
  	 * 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);
  	clist = OpernameGetCandidates(names, '\0');
  
  	if (clist == NULL)
*************** regoperatorin(PG_FUNCTION_ARGS)
*** 626,633 ****
  	 * 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);
  	if (nargs == 1)
  		ereport(ERROR,
  				(errcode(ERRCODE_UNDEFINED_PARAMETER),
--- 624,630 ----
  	 * datatype cannot be used for any system column that needs to receive
  	 * data during bootstrap.
  	 */
! 	parseNameAndArgTypes(opr_name_or_oid, true, &names, &nargs, argtypes);
  	if (nargs == 1)
  		ereport(ERROR,
  				(errcode(ERRCODE_UNDEFINED_PARAMETER),
*************** regclassin(PG_FUNCTION_ARGS)
*** 827,833 ****
  	 * 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");
  
  	result = RangeVarGetRelid(makeRangeVarFromNameList(names), false);
  
--- 824,830 ----
  	 * 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);
  
  	result = RangeVarGetRelid(makeRangeVarFromNameList(names), false);
  
*************** text_regclass(PG_FUNCTION_ARGS)
*** 1093,1099 ****
   * Given a C string, parse it into a qualified-name list.
   */
  List *
! stringToQualifiedNameList(const char *string, const char *caller)
  {
  	char	   *rawname;
  	List	   *result = NIL;
--- 1090,1096 ----
   * Given a C string, parse it into a qualified-name list.
   */
  List *
! stringToQualifiedNameList(const char *string)
  {
  	char	   *rawname;
  	List	   *result = NIL;
*************** stringToQualifiedNameList(const char *st
*** 1141,1149 ****
   * for unary operators).
   */
  static void
! parseNameAndArgTypes(const char *string, const char *caller,
! 					 bool allowNone,
! 					 List **names, int *nargs, Oid *argtypes)
  {
  	char	   *rawname;
  	char	   *ptr;
--- 1138,1145 ----
   * for unary operators).
   */
  static void
! parseNameAndArgTypes(const char *string, bool allowNone, List **names,
! 					 int *nargs, Oid *argtypes)
  {
  	char	   *rawname;
  	char	   *ptr;
*************** parseNameAndArgTypes(const char *string,
*** 1174,1180 ****
  
  	/* Separate the name and parse it into a list */
  	*ptr++ = '\0';
! 	*names = stringToQualifiedNameList(rawname, caller);
  
  	/* Check for the trailing right parenthesis and remove it */
  	ptr2 = ptr + strlen(ptr);
--- 1170,1176 ----
  
  	/* Separate the name and parse it into a list */
  	*ptr++ = '\0';
! 	*names = stringToQualifiedNameList(rawname);
  
  	/* Check for the trailing right parenthesis and remove it */
  	ptr2 = ptr + strlen(ptr);
Index: src/backend/utils/fmgr/funcapi.c
===================================================================
RCS file: /home/alvherre/Code/cvs/pgsql/src/backend/utils/fmgr/funcapi.c,v
retrieving revision 1.35
diff -c -p -r1.35 funcapi.c
*** src/backend/utils/fmgr/funcapi.c	6 Jun 2007 23:00:39 -0000	1.35
--- src/backend/utils/fmgr/funcapi.c	25 Jun 2007 17:10:07 -0000
*************** RelationNameGetTupleDesc(const char *rel
*** 1045,1051 ****
  	List	   *relname_list;
  
  	/* Open relation and copy the tuple description */
! 	relname_list = stringToQualifiedNameList(relname, "RelationNameGetTupleDesc");
  	relvar = makeRangeVarFromNameList(relname_list);
  	rel = relation_openrv(relvar, AccessShareLock);
  	tupdesc = CreateTupleDescCopy(RelationGetDescr(rel));
--- 1045,1051 ----
  	List	   *relname_list;
  
  	/* Open relation and copy the tuple description */
! 	relname_list = stringToQualifiedNameList(relname);
  	relvar = makeRangeVarFromNameList(relname_list);
  	rel = relation_openrv(relvar, AccessShareLock);
  	tupdesc = CreateTupleDescCopy(RelationGetDescr(rel));
Index: src/include/utils/builtins.h
===================================================================
RCS file: /home/alvherre/Code/cvs/pgsql/src/include/utils/builtins.h,v
retrieving revision 1.296
diff -c -p -r1.296 builtins.h
*** src/include/utils/builtins.h	6 Jun 2007 23:00:46 -0000	1.296
--- src/include/utils/builtins.h	25 Jun 2007 17:07:21 -0000
*************** extern Datum regtypeout(PG_FUNCTION_ARGS
*** 524,530 ****
  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 char *format_procedure(Oid procedure_oid);
  extern char *format_operator(Oid operator_oid);
  
--- 524,530 ----
  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);
  extern char *format_procedure(Oid procedure_oid);
  extern char *format_operator(Oid operator_oid);
  
Index: src/pl/plpgsql/src/pl_comp.c
===================================================================
RCS file: /home/alvherre/Code/cvs/pgsql/src/pl/plpgsql/src/pl_comp.c,v
retrieving revision 1.115
diff -c -p -r1.115 pl_comp.c
*** src/pl/plpgsql/src/pl_comp.c	6 Jun 2007 23:00:48 -0000	1.115
--- src/pl/plpgsql/src/pl_comp.c	25 Jun 2007 17:11:10 -0000
*************** plpgsql_parse_tripwordtype(char *word)
*** 1340,1347 ****
  	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"));
  	classOid = RangeVarGetRelid(relvar, true);
  	if (!OidIsValid(classOid))
  		goto done;
--- 1340,1346 ----
  	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]));
  	classOid = RangeVarGetRelid(relvar, true);
  	if (!OidIsValid(classOid))
  		goto done;
*************** plpgsql_parse_dblwordrowtype(char *word)
*** 1465,1471 ****
  	word[i] = '%';
  
  	/* Lookup the relation */
! 	relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp, "plpgsql_parse_dblwordrowtype"));
  	classOid = RangeVarGetRelid(relvar, true);
  	if (!OidIsValid(classOid))
  		ereport(ERROR,
--- 1464,1470 ----
  	word[i] = '%';
  
  	/* Lookup the relation */
! 	relvar = makeRangeVarFromNameList(stringToQualifiedNameList(cp));
  	classOid = RangeVarGetRelid(relvar, true);
  	if (!OidIsValid(classOid))
  		ereport(ERROR,
