aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pgstatfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-07-27 04:53:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-07-27 04:53:12 +0000
commitb6a1d25b0aa179c86e0607d4c0c3b647dc5bbb87 (patch)
tree7881c788c3f659b45eb371c0e40fbaf188051cb0 /src/backend/utils/adt/pgstatfuncs.c
parent524cfad23f31db70a23fc1fe748c050838d5fad0 (diff)
downloadpostgresql-b6a1d25b0aa179c86e0607d4c0c3b647dc5bbb87.tar.gz
postgresql-b6a1d25b0aa179c86e0607d4c0c3b647dc5bbb87.zip
Error message editing in utils/adt. Again thanks to Joe Conway for doing
the bulk of the heavy lifting ...
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
-rw-r--r--src/backend/utils/adt/pgstatfuncs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 083bb1374a4..df8c8e92cc5 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -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;