diff --git a/contrib/dolphin/include/builtin_funcs.ini b/contrib/dolphin/include/builtin_funcs.ini index e094095d5f2ee9a54e1476a1fe8c89e4b362dc34..f433f5b48253757cd510b578a2169448b9fc1f36 100755 --- a/contrib/dolphin/include/builtin_funcs.ini +++ b/contrib/dolphin/include/builtin_funcs.ini @@ -13237,7 +13237,7 @@ AddFuncGroup( ), AddFuncGroup( "query_parameterization_views", 1, - AddBuiltinFunc(_0(6809), _1("query_parameterization_views"), _2(1), _3(false), _4(true), _5(query_parameterization_views), _6(2249), _7(PG_CATALOG_NAMESPACE), _8(BOOTSTRAP_SUPERUSERID), _9(INTERNALlanguageId), _10(1), _11(1000), _12(0), _13(0), _14(false), _15(false), _16(false), _17(false), _18('s'), _19(0), _20(0), _21(6, 26, 19, 16, 22, 21, 19), _22(6, 'o', 'o', 'o', 'o', 'o', 'o'), _23(6, "reloid", "query_type", "is_bypass", "param_types", "param_nums", "parameterized_query"), _24(NULL), _25("query_parameterization_views"), _26(NULL), _27(NULL), _28(NULL), _29(0), _30(false), _31(NULL), _32(false), _33("query_parameterization_views"), _34('f'), _35(NULL), _36(0), _37(false), _38(NULL), _39(NULL), _40(0)) + AddBuiltinFunc(_0(6809), _1("query_parameterization_views"), _2(1), _3(false), _4(true), _5(query_parameterization_views), _6(2249), _7(PG_CATALOG_NAMESPACE), _8(BOOTSTRAP_SUPERUSERID), _9(INTERNALlanguageId), _10(1), _11(1000), _12(0), _13(0), _14(false), _15(false), _16(false), _17(false), _18('s'), _19(0), _20(0), _21(6, 26, 19, 16, 22, 21, 25), _22(6, 'o', 'o', 'o', 'o', 'o', 'o'), _23(6, "reloid", "query_type", "is_bypass", "param_types", "param_nums", "parameterized_query"), _24(NULL), _25("query_parameterization_views"), _26(NULL), _27(NULL), _28(NULL), _29(0), _30(false), _31(NULL), _32(false), _33("query_parameterization_views"), _34('f'), _35(NULL), _36(0), _37(false), _38(NULL), _39(NULL), _40(0)) ), AddFuncGroup( "hnswinsert", 1, diff --git a/contrib/dolphin/plugin_parser/gram.y b/contrib/dolphin/plugin_parser/gram.y index 816e56ffed2eba456a22bef565b32065d60e1128..d4edbd06a1f93f541dc012fdbee19d7fb8501507 100644 --- a/contrib/dolphin/plugin_parser/gram.y +++ b/contrib/dolphin/plugin_parser/gram.y @@ -42941,6 +42941,14 @@ insertSelectOptions(SelectStmt *stmt, parser_errposition(exprLocation(limitOffset)))); } stmt->limitOffset = limitOffset; + if (DB_IS_CMPT(D_FORMAT) && stmt->limitCount) { + const char* message = "A TOP clause cannot be used together with an OFFSET clause in D-format database"; + InsertErrorMessage(message, u_sess->plsql_cxt.plpgsql_yylloc); + ereport(errstate, + (errcode(ERRCODE_SYNTAX_ERROR), + errmsg("A TOP clause cannot be used together with an OFFSET clause in D-format database"), + parser_errposition(exprLocation(limitOffset)))); + } } if (limitClause->limitCount) {