From 93c701edc6c6f065cd25f77f63ab31aff085d6ac Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 15 May 2008 00:17:41 +0000 Subject: Add support for tracking call counts and elapsed runtime for user-defined functions. Note that because this patch changes FmgrInfo, any external C functions you might be testing with 8.4 will need to be recompiled. Patch by Martin Pihlak, some editorialization by me (principally, removing tracking of getrusage() numbers) --- src/include/fmgr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/include/fmgr.h') diff --git a/src/include/fmgr.h b/src/include/fmgr.h index ec3261b081..f0cc26f531 100644 --- a/src/include/fmgr.h +++ b/src/include/fmgr.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/fmgr.h,v 1.58 2008/04/21 00:26:46 tgl Exp $ + * $PostgreSQL: pgsql/src/include/fmgr.h,v 1.59 2008/05/15 00:17:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -49,6 +49,7 @@ typedef struct FmgrInfo * count */ bool fn_strict; /* function is "strict" (NULL in => NULL out) */ bool fn_retset; /* function returns a set */ + unsigned char fn_stats; /* collect stats if track_functions > this */ void *fn_extra; /* extra space for use by handler */ MemoryContext fn_mcxt; /* memory context to store fn_extra in */ fmNodePtr fn_expr; /* expression parse tree for call, or NULL */ -- cgit v1.2.3