!4791 为dolphin增加一个check_sql_fn_retval函数钩子
Merge pull request !4791 from Cross-罗/fix_interval
This commit is contained in:
@ -1604,6 +1604,10 @@ void check_if_exist_client_logic_type(List *tlist, Oid ret_type)
|
||||
bool check_sql_fn_retval(Oid func_id, Oid ret_type, List* query_tree_list, bool* modify_target_list,
|
||||
JunkFilter** junk_filter, bool plpgsql_validation)
|
||||
{
|
||||
if (u_sess->hook_cxt.checkSqlFnRetvalHook != NULL) {
|
||||
return ((checkSqlFnRetval)(u_sess->hook_cxt.checkSqlFnRetvalHook))(
|
||||
func_id, ret_type, query_tree_list, modify_target_list, junk_filter, plpgsql_validation);
|
||||
}
|
||||
Query* parse = NULL;
|
||||
List** tlist_ptr;
|
||||
List* tlist = NIL;
|
||||
|
@ -37,6 +37,8 @@ extern void sql_fn_replace(struct ParseState* pstate, SQLFunctionParseInfoPtr pi
|
||||
|
||||
extern bool check_sql_fn_retval(Oid func_id, Oid rettype, List* queryTreeList, bool* modifyTargetList,
|
||||
JunkFilter** junkFilter, bool plpgsql_validation = false);
|
||||
typedef bool (*checkSqlFnRetval)(Oid func_id, Oid rettype, List* queryTreeList, bool* modifyTargetList,
|
||||
JunkFilter** junkFilter, bool plpgsql_validation);
|
||||
|
||||
extern DestReceiver* CreateSQLFunctionDestReceiver(void);
|
||||
|
||||
|
@ -2921,6 +2921,7 @@ typedef struct knl_u_hook_context {
|
||||
void *pluginMultiResExceptionHook;
|
||||
void *getTypeZeroValueHook;
|
||||
void *deparseQueryHook;
|
||||
void *checkSqlFnRetvalHook;
|
||||
} knl_u_hook_context;
|
||||
|
||||
typedef struct knl_u_libsw_context {
|
||||
|
Reference in New Issue
Block a user