Skip to content

Commit 90e04ba

Browse files
Patch revoked because of objections.
1 parent 33980a0 commit 90e04ba

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

src/backend/utils/cache/lsyscache.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/cache/lsyscache.c,v 1.169 2010/04/23 22:23:39 sriggs Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/cache/lsyscache.c,v 1.170 2010/04/24 16:20:32 sriggs Exp $
1111
*
1212
* NOTES
1313
* Eventually, the index information should go through here, too.
@@ -38,9 +38,6 @@
3838
/* Hook for plugins to get control in get_attavgwidth() */
3939
get_attavgwidth_hook_type get_attavgwidth_hook = NULL;
4040

41-
/* Hook for plugins to get control in get_func_cost and get_func_rows */
42-
get_func_cost_hook_type get_func_cost_hook = NULL;
43-
get_func_rows_hook_type get_func_rows_hook = NULL;
4441

4542
/* ---------- AMOP CACHES ---------- */
4643

@@ -1412,12 +1409,6 @@ get_func_cost(Oid funcid)
14121409
HeapTuple tp;
14131410
float4 result;
14141411

1415-
if (get_func_cost_hook)
1416-
{
1417-
result = (*get_func_cost_hook) (funcid);
1418-
if (result > (float4) 0)
1419-
return result;
1420-
}
14211412
tp = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid));
14221413
if (!HeapTupleIsValid(tp))
14231414
elog(ERROR, "cache lookup failed for function %u", funcid);
@@ -1437,12 +1428,6 @@ get_func_rows(Oid funcid)
14371428
HeapTuple tp;
14381429
float4 result;
14391430

1440-
if (get_func_rows_hook)
1441-
{
1442-
result = (*get_func_rows_hook) (funcid);
1443-
if (result > (float4) 0)
1444-
return result;
1445-
}
14461431
tp = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid));
14471432
if (!HeapTupleIsValid(tp))
14481433
elog(ERROR, "cache lookup failed for function %u", funcid);

src/include/utils/lsyscache.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.132 2010/04/23 22:23:39 sriggs Exp $
9+
* $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.133 2010/04/24 16:20:32 sriggs Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -30,12 +30,6 @@ typedef enum IOFuncSelector
3030
typedef int32 (*get_attavgwidth_hook_type) (Oid relid, AttrNumber attnum);
3131
extern PGDLLIMPORT get_attavgwidth_hook_type get_attavgwidth_hook;
3232

33-
/* Hook for plugins to get control in get_func_cost and get_func_rows */
34-
typedef float4 (*get_func_cost_hook_type) (Oid funcid);
35-
extern PGDLLIMPORT get_func_cost_hook_type get_func_cost_hook;
36-
typedef float4 (*get_func_rows_hook_type) (Oid funcid);
37-
extern PGDLLIMPORT get_func_rows_hook_type get_func_rows_hook;
38-
3933
extern bool op_in_opfamily(Oid opno, Oid opfamily);
4034
extern int get_op_opfamily_strategy(Oid opno, Oid opfamily);
4135
extern void get_op_opfamily_properties(Oid opno, Oid opfamily,

0 commit comments

Comments
 (0)