1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +03:00

Error message editing in utils/adt. Again thanks to Joe Conway for doing

the bulk of the heavy lifting ...
This commit is contained in:
Tom Lane
2003-07-27 04:53:12 +00:00
parent 524cfad23f
commit b6a1d25b0a
79 changed files with 2141 additions and 1081 deletions

View File

@@ -186,12 +186,16 @@ pg_stat_get_backend_idset(PG_FUNCTION_ARGS)
if (fcinfo->resultinfo == NULL ||
!IsA(fcinfo->resultinfo, ReturnSetInfo))
elog(ERROR, "pg_stat_get_backend_idset: called in context that does not accept a set result");
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("set-valued function called in context that "
"cannot accept a set")));
if (fmgr_info->fn_extra == NULL)
{
if (fmgr_info->fn_mcxt == NULL)
elog(ERROR, "No function memory context in set-function");
elog(ERROR, "no function memory context in set-function");
fmgr_info->fn_extra = MemoryContextAlloc(fmgr_info->fn_mcxt,
2 * sizeof(int));
((int *) (fmgr_info->fn_extra))[0] = 0;