diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-06 23:21:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-06 23:21:45 +0000 |
commit | 85801a4dbdee22f230637311681b8b03a72979db (patch) | |
tree | 28054ba90fda332be0d5254e5bdaba5a2a51f1f2 /src/backend/utils/adt/varbit.c | |
parent | a965750abf2504e266e5071dc90365be9485395a (diff) | |
download | postgresql-85801a4dbdee22f230637311681b8b03a72979db.tar.gz postgresql-85801a4dbdee22f230637311681b8b03a72979db.zip |
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/varbit.c')
-rw-r--r-- | src/backend/utils/adt/varbit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/utils/adt/varbit.c b/src/backend/utils/adt/varbit.c index d75d05309df..a294bfc9fff 100644 --- a/src/backend/utils/adt/varbit.c +++ b/src/backend/utils/adt/varbit.c @@ -9,7 +9,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.18 2001/05/22 16:37:16 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.19 2001/10/06 23:21:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,6 +19,7 @@ #include "catalog/pg_type.h" #include "utils/array.h" #include "utils/fmgroids.h" +#include "utils/memutils.h" #include "utils/varbit.h" #define HEXDIG(z) ((z)<10 ? ((z)+'0') : ((z)-10+'A')) @@ -238,7 +239,7 @@ _bit(PG_FUNCTION_ARGS) static FmgrInfo bit_finfo; if (bit_finfo.fn_oid == InvalidOid) - fmgr_info(F_BIT, &bit_finfo); + fmgr_info_cxt(F_BIT, &bit_finfo, TopMemoryContext); MemSet(&locfcinfo, 0, sizeof(locfcinfo)); locfcinfo.flinfo = &bit_finfo; @@ -452,7 +453,7 @@ _varbit(PG_FUNCTION_ARGS) static FmgrInfo varbit_finfo; if (varbit_finfo.fn_oid == InvalidOid) - fmgr_info(F_VARBIT, &varbit_finfo); + fmgr_info_cxt(F_VARBIT, &varbit_finfo, TopMemoryContext); MemSet(&locfcinfo, 0, sizeof(locfcinfo)); locfcinfo.flinfo = &varbit_finfo; |