summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2010-04-23 22:23:39 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2010-04-23 22:23:39 +0000
commit473af3973710b9e2f4e945d8290adae8de9696cc (patch)
tree90fcd98789af3364f33256cfaef2fa9bb7581644 /src/include
parent491d1ea5b3605809ec1103e939b3324acc9a2516 (diff)
Add missing optimizer hooks for function cost and number of rows.
Closely follow design of other optimizer hooks: if hook exists retrieve value from plugin; if still not set then get from cache.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/lsyscache.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h
index 429bcaa1477..e25a4d9475a 100644
--- a/src/include/utils/lsyscache.h
+++ b/src/include/utils/lsyscache.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.131 2010/01/04 02:44:40 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.132 2010/04/23 22:23:39 sriggs Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,6 +30,12 @@ typedef enum IOFuncSelector
typedef int32 (*get_attavgwidth_hook_type) (Oid relid, AttrNumber attnum);
extern PGDLLIMPORT get_attavgwidth_hook_type get_attavgwidth_hook;
+/* Hook for plugins to get control in get_func_cost and get_func_rows */
+typedef float4 (*get_func_cost_hook_type) (Oid funcid);
+extern PGDLLIMPORT get_func_cost_hook_type get_func_cost_hook;
+typedef float4 (*get_func_rows_hook_type) (Oid funcid);
+extern PGDLLIMPORT get_func_rows_hook_type get_func_rows_hook;
+
extern bool op_in_opfamily(Oid opno, Oid opfamily);
extern int get_op_opfamily_strategy(Oid opno, Oid opfamily);
extern void get_op_opfamily_properties(Oid opno, Oid opfamily,