summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/varchar.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-10-06 23:21:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-10-06 23:21:45 +0000
commit85801a4dbdee22f230637311681b8b03a72979db (patch)
tree28054ba90fda332be0d5254e5bdaba5a2a51f1f2 /src/backend/utils/adt/varchar.c
parenta965750abf2504e266e5071dc90365be9485395a (diff)
downloadpostgresql-85801a4dbdee22f230637311681b8b03a72979db.tar.gz
Rearrange fmgr.c and relcache so that it's possible to keep FmgrInfo
lookup info in the relcache for index access method support functions. This makes a huge difference for dynamically loaded support functions, and should save a few cycles even for built-in ones. Also tweak dfmgr.c so that load_external_function is called only once, not twice, when doing fmgr_info for a dynamically loaded function. All per performance gripe from Teodor Sigaev, 5-Oct-01.
Diffstat (limited to 'src/backend/utils/adt/varchar.c')
-rw-r--r--src/backend/utils/adt/varchar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c
index 7ed56e7962..c963709ac8 100644
--- a/src/backend/utils/adt/varchar.c
+++ b/src/backend/utils/adt/varchar.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.83 2001/10/03 05:29:24 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.84 2001/10/06 23:21:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -285,7 +285,7 @@ _bpchar(PG_FUNCTION_ARGS)
static FmgrInfo bpchar_finfo;
if (bpchar_finfo.fn_oid == InvalidOid)
- fmgr_info(F_BPCHAR, &bpchar_finfo);
+ fmgr_info_cxt(F_BPCHAR, &bpchar_finfo, TopMemoryContext);
MemSet(&locfcinfo, 0, sizeof(locfcinfo));
locfcinfo.flinfo = &bpchar_finfo;
@@ -544,7 +544,7 @@ _varchar(PG_FUNCTION_ARGS)
static FmgrInfo varchar_finfo;
if (varchar_finfo.fn_oid == InvalidOid)
- fmgr_info(F_VARCHAR, &varchar_finfo);
+ fmgr_info_cxt(F_VARCHAR, &varchar_finfo, TopMemoryContext);
MemSet(&locfcinfo, 0, sizeof(locfcinfo));
locfcinfo.flinfo = &varchar_finfo;