hopefully a little more useful.
tupdesc = TypeGetTupleDesc(functypeid, NIL);
else if (functyptype == 'p' && functypeid == RECORDOID)
tupdesc = pgresultGetTupleDesc(res);
- else if (functyptype == 'b')
- elog(ERROR, "dblink_fetch: invalid kind of return type specified for function");
else
- elog(ERROR, "dblink_fetch: unknown kind of return type specified for function");
+ elog(ERROR, "dblink_fetch: return type must be a row type");
/* store needed metadata for subsequent calls */
slot = TupleDescGetSlot(tupdesc);
tupdesc = TypeGetTupleDesc(functypeid, NIL);
else if (functyptype == 'p' && functypeid == RECORDOID)
tupdesc = pgresultGetTupleDesc(res);
- else if (functyptype == 'b')
- elog(ERROR, "Invalid kind of return type specified for function");
else
- elog(ERROR, "Unknown kind of return type specified for function");
+ elog(ERROR, "dblink: return type must be a row type");
}
/* store needed metadata for subsequent calls */
tupdesc = make_crosstab_tupledesc(spi_tupdesc, num_categories);
}
}
- else if (functyptype == 'b')
- elog(ERROR, "Invalid kind of return type specified for function");
else
- elog(ERROR, "Unknown kind of return type specified for function");
+ elog(ERROR, "crosstab: return type must be a row type");
/*
* Check that return tupdesc is compatible with the one we got
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.94 2002/11/13 00:39:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.95 2003/06/15 17:59:10 tgl Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
else if (functyptype == 'p' && typeoid == RECORDOID)
elog(ERROR, "Unable to determine tuple description for function returning \"record\"");
else
- elog(ERROR, "Unknown kind of return type specified for function");
+ {
+ /* crummy error message, but parser should have caught this */
+ elog(ERROR, "function in FROM has unsupported return type");
+ }
return tupdesc;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.96 2003/04/08 23:20:00 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.97 2003/06/15 17:59:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
*/
}
else
- elog(ERROR, "Unknown kind of return type specified for function");
+ elog(ERROR, "return type %s is not supported for SQL functions",
+ format_type_be(rettype));
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.17 2003/01/12 22:01:38 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.18 2003/06/15 17:59:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
tupdesc = BuildDescForRelation(rte->coldeflist);
}
else
- elog(ERROR, "Unknown kind of return type specified for function");
+ {
+ /* crummy error message, but parser should have caught this */
+ elog(ERROR, "function in FROM has unsupported return type");
+ }
scanstate->tupdesc = tupdesc;
ExecSetSlotDescriptor(scanstate->ss.ss_ScanTupleSlot,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.82 2003/06/11 22:13:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.83 2003/06/15 17:59:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
}
}
else
- elog(ERROR, "Unknown kind of return type specified for function %s",
+ elog(ERROR, "function %s() in FROM has unsupported return type",
funcname);
/*----------
}
}
else
- elog(ERROR, "Unknown kind of return type specified for function");
+ elog(ERROR, "function in FROM has unsupported return type");
}
break;
case RTE_JOIN:
*vartypmod = -1;
}
else
- elog(ERROR, "Unknown kind of return type specified for function");
+ elog(ERROR, "function in FROM has unsupported return type");
}
break;
case RTE_JOIN: