From 3aa7e08d3337f250b260a1b6b6d1bc081ba7c08e Mon Sep 17 00:00:00 2001 From: raywill Date: Mon, 26 Jul 2021 15:30:14 +0800 Subject: [PATCH] [feature] support user defined nextval("seqname") function --- src/sql/resolver/expr/ob_raw_expr_resolver_impl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sql/resolver/expr/ob_raw_expr_resolver_impl.cpp b/src/sql/resolver/expr/ob_raw_expr_resolver_impl.cpp index 3b34c391e2..51f688d7ad 100644 --- a/src/sql/resolver/expr/ob_raw_expr_resolver_impl.cpp +++ b/src/sql/resolver/expr/ob_raw_expr_resolver_impl.cpp @@ -3452,6 +3452,13 @@ int ObRawExprResolverImpl::process_fun_sys_node(const ParseNode* node, ObRawExpr name = ObString::make_string("ora_decode"); } } + + if (OB_SUCC(ret)) { + if (0 == name.case_compare("nextval")) { + ret = OB_ERR_FUNCTION_UNKNOWN; + } + } + if (OB_FAIL(ret)) { /*^-^*/ } else if (OB_FAIL(ob_write_string(ctx_.expr_factory_.get_allocator(), name, func_name))) { -- GitLab