MonetDB: Mar2018 - make C-UDFs also work with type smallint as i...
Changeset: adfd8ea26e1c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=adfd8ea26e1c Modified Files: sql/backends/monet5/UDF/capi/capi.c Branch: Mar2018 Log Message: make C-UDFs also work with type smallint as input/output type diffs (12 lines): diff --git a/sql/backends/monet5/UDF/capi/capi.c b/sql/backends/monet5/UDF/capi/capi.c --- a/sql/backends/monet5/UDF/capi/capi.c +++ b/sql/backends/monet5/UDF/capi/capi.c @@ -1605,7 +1605,7 @@ static const char *GetTypeName(int type) if (type == TYPE_bit || type == TYPE_bte) { tpe = "bte"; } else if (type == TYPE_sht) { - tpe = "short"; + tpe = "sht"; } else if (type == TYPE_int) { tpe = "int"; } else if (type == TYPE_oid) { ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Mar2018 - mclient / timerHuman(): use bool instead of int
Changeset: d5aed8f3eb80 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d5aed8f3eb80 Modified Files: clients/mapiclient/mclient.c Branch: Mar2018 Log Message: mclient / timerHuman(): use bool instead of int diffs (125 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -261,7 +261,7 @@ static enum itimers { static bool timerHumanCalled = false; static void -timerHuman(int64_t sqloptimizer, int64_t maloptimizer, int64_t querytime, int singleinstr, int total) +timerHuman(int64_t sqloptimizer, int64_t maloptimizer, int64_t querytime, bool singleinstr, bool total) { timertype t = th - t0; @@ -274,8 +274,8 @@ timerHuman(int64_t sqloptimizer, int64_t * - server-measured detailed performance measures only per query. */ - /* (!singleinstr != !total) is C for ((singleinstr != 0) XOR (total != 0)) */ - if (timermode == T_CLOCK && (!singleinstr != !total)) { + /* "(singleinstr != total)" is C for (logical) "(singleinstr XOR total)" */ + if (timermode == T_CLOCK && (singleinstr != total)) { /* print wall-clock in "human-friendly" format */ fflush(stderr); mnstr_flush(toConsole); @@ -301,7 +301,7 @@ timerHuman(int64_t sqloptimizer, int64_t fflush(stderr); return; } - if (timermode == T_PERF && ((!singleinstr != !total) || !total)) { + if (timermode == T_PERF && (!total || (singleinstr != total))) { /* for performance measures we use milliseconds as the base */ fflush(stderr); mnstr_flush(toConsole); @@ -310,7 +310,7 @@ timerHuman(int64_t sqloptimizer, int64_t sqloptimizer / 1000, (int) (sqloptimizer % 1000), maloptimizer / 1000, (int) (maloptimizer % 1000), querytime / 1000, (int) (querytime % 1000)); - if (!singleinstr != !total) + if (singleinstr != total) fprintf(stderr, "clk:%" PRId64 ".%03d ", t / 1000, (int) (t % 1000)); fprintf(stderr, "ms\n"); fflush(stderr); @@ -1809,7 +1809,7 @@ end_pager(stream *saveFD) #endif static int -format_result(Mapi mid, MapiHdl hdl, int singleinstr) +format_result(Mapi mid, MapiHdl hdl, bool singleinstr) { MapiMsg rc = MERROR; int64_t aff, lid; @@ -1873,14 +1873,14 @@ format_result(Mapi mid, MapiHdl hdl, int } mnstr_printf(toConsole, "\n"); } - timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, 0); + timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, false); continue; case Q_SCHEMA: SQLqueryEcho(hdl); if (formatter == TABLEformatter) { mnstr_printf(toConsole, "operation successful\n"); } - timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, 0); + timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, false); continue; case Q_TRANS: SQLqueryEcho(hdl); @@ -1888,7 +1888,7 @@ format_result(Mapi mid, MapiHdl hdl, int mnstr_printf(toConsole, "auto commit mode: %s\n", mapi_get_autocommit(mid) ? "on" : "off"); - timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, 0); + timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, false); continue; case Q_PREPARE: SQLqueryEcho(hdl); @@ -1897,7 +1897,7 @@ format_result(Mapi mid, MapiHdl hdl, int "execute prepared statement " "using: EXEC %d(...)\n", mapi_get_tableid(hdl)); - timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, 0); + timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, false); break; case Q_TABLE: break; @@ -1971,16 +1971,16 @@ format_result(Mapi mid, MapiHdl hdl, int break; } - timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, 0); + timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, false); } } while (!mnstr
MonetDB: default - Merge with Mar2018 branch.
Changeset: dd3363bd8503 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dd3363bd8503 Modified Files: clients/mapiclient/dump.c clients/mapiclient/mclient.c monetdb5/modules/mal/pcre.c sql/backends/monet5/sql_upgrades.c sql/scripts/51_sys_schema_extension.sql sql/server/sql_parser.y sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb/Tests/check.SQL.py sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Mar2018 branch. diffs (truncated from 2433 to 300 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -817,8 +817,17 @@ describe_table(Mapi mid, const char *sch remark = NULL; goto bailout; } - if (view) + if (view) { + /* skip initial comments and empty lines */ + while ((view[0] == '-' && view[1] == '-') || view[0] == '\n') { + view = strchr(view, '\n'); + if (view == NULL) + view = ""; + else + view++; + } view = strdup(view); + } if (remark) remark = strdup(remark); mapi_close_handle(hdl); @@ -1384,17 +1393,17 @@ static int dump_function(Mapi mid, stream *toConsole, const char *fid, int hashge) { MapiHdl hdl; - size_t qlen = 200 + strlen(fid); + size_t qlen = 400 + strlen(fid); char *query = malloc(qlen); const char *sep; - char *ffunc; - const char *sname, *fname; + char *ffunc, *flkey; + const char *sname, *fname, *ftkey; int flang, ftype; if (!query) return 1; - snprintf(query, qlen, "SELECT f.id, f.func, f.language, f.type, s.name, f.name FROM sys.functions f, sys.schemas s WHERE f.schema_id = s.id AND f.id = %s", fid); + snprintf(query, qlen, "SELECT f.id, f.func, f.language, f.type, s.name, f.name, ft.function_type_keyword, fl.language_keyword FROM sys.functions f JOIN sys.schemas s ON f.schema_id = s.id JOIN sys.function_types ft ON f.type = ft.function_type_id LEFT OUTER JOIN sys.function_languages fl ON f.language = fl.language_id WHERE f.id = %s", fid); hdl = mapi_query(mid, query); if (mapi_fetch_row(hdl) == 0) { free(query); @@ -1406,40 +1415,28 @@ dump_function(Mapi mid, stream *toConsol ftype = atoi(mapi_fetch_field(hdl, 3)); sname = mapi_fetch_field(hdl, 4); fname = mapi_fetch_field(hdl, 5); + ftkey = mapi_fetch_field(hdl, 6); + flkey = mapi_fetch_field(hdl, 7); if (flang == 1 || flang == 2) { - /* all information is stored in the func column */ + /* all information is stored in the func column +* first skip initial comments and empty lines */ + while ((ffunc[0] == '-' && ffunc[1] == '-') || ffunc[0] == '\n') { + ffunc = strchr(ffunc, '\n'); + if (ffunc == NULL) + ffunc = ""; + else + ffunc++; + } mnstr_printf(toConsole, "%s\n", ffunc); mapi_close_handle(hdl); free(query); return 0; } - mnstr_printf(toConsole, "CREATE "); - switch (ftype) { - case 1: /* scalar function */ - case
MonetDB: Mar2018 - When dumping views and functions, skip initia...
Changeset: 7b8899a5cd28 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7b8899a5cd28 Modified Files: clients/mapiclient/dump.c Branch: Mar2018 Log Message: When dumping views and functions, skip initial comments and empty lines. diffs (39 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -817,8 +817,17 @@ describe_table(Mapi mid, const char *sch remark = NULL; goto bailout; } - if (view) + if (view) { + /* skip initial comments and empty lines */ + while ((view[0] == '-' && view[1] == '-') || view[0] == '\n') { + view = strchr(view, '\n'); + if (view == NULL) + view = ""; + else + view++; + } view = strdup(view); + } if (remark) remark = strdup(remark); mapi_close_handle(hdl); @@ -1409,7 +1418,15 @@ dump_function(Mapi mid, stream *toConsol ftkey = mapi_fetch_field(hdl, 6); flkey = mapi_fetch_field(hdl, 7); if (flang == 1 || flang == 2) { - /* all information is stored in the func column */ + /* all information is stored in the func column +* first skip initial comments and empty lines */ + while ((ffunc[0] == '-' && ffunc[1] == '-') || ffunc[0] == '\n') { + ffunc = strchr(ffunc, '\n'); + if (ffunc == NULL) + ffunc = ""; + else + ffunc++; + } mnstr_printf(toConsole, "%s\n", ffunc); mapi_close_handle(hdl); free(query); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Mar2018 - Use function_type_keyword and language_keywor...
Changeset: 1b6dfe528792 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b6dfe528792 Modified Files: clients/mapiclient/dump.c Branch: Mar2018 Log Message: Use function_type_keyword and language_keyword columns when dumping. diffs (114 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -1384,17 +1384,17 @@ static int dump_function(Mapi mid, stream *toConsole, const char *fid, int hashge) { MapiHdl hdl; - size_t qlen = 200 + strlen(fid); + size_t qlen = 400 + strlen(fid); char *query = malloc(qlen); const char *sep; - char *ffunc; - const char *sname, *fname; + char *ffunc, *flkey; + const char *sname, *fname, *ftkey; int flang, ftype; if (!query) return 1; - snprintf(query, qlen, "SELECT f.id, f.func, f.language, f.type, s.name, f.name FROM sys.functions f, sys.schemas s WHERE f.schema_id = s.id AND f.id = %s", fid); + snprintf(query, qlen, "SELECT f.id, f.func, f.language, f.type, s.name, f.name, ft.function_type_keyword, fl.language_keyword FROM sys.functions f JOIN sys.schemas s ON f.schema_id = s.id JOIN sys.function_types ft ON f.type = ft.function_type_id LEFT OUTER JOIN sys.function_languages fl ON f.language = fl.language_id WHERE f.id = %s", fid); hdl = mapi_query(mid, query); if (mapi_fetch_row(hdl) == 0) { free(query); @@ -1406,6 +1406,8 @@ dump_function(Mapi mid, stream *toConsol ftype = atoi(mapi_fetch_field(hdl, 3)); sname = mapi_fetch_field(hdl, 4); fname = mapi_fetch_field(hdl, 5); + ftkey = mapi_fetch_field(hdl, 6); + flkey = mapi_fetch_field(hdl, 7); if (flang == 1 || flang == 2) { /* all information is stored in the func column */ mnstr_printf(toConsole, "%s\n", ffunc); @@ -1413,33 +1415,11 @@ dump_function(Mapi mid, stream *toConsol free(query); return 0; } - mnstr_printf(toConsole, "CREATE "); - switch (ftype) { - case 1: /* scalar function */ - case 5: /* table returning function */ - mnstr_printf(toConsole, "FUNCTION"); - break; - case 2: - mnstr_printf(toConsole, "PROCEDURE"); - break; - case 3: - mnstr_printf(toConsole, "AGGREGATE"); - break; - case 4: - mnstr_printf(toConsole, "FILTER FUNCTION"); - break; - case 7: - mnstr_printf(toConsole, "LOADER"); - break; - default: - /* shouldn't happen (6 is F_ANALYTIC, but no syntax to -* create, or values are not defined) */ - free(query); - mapi_close_handle(hdl); - return -1; - } + /* strdup these two because they are needed after another query */ ffunc = strdup(ffunc); - mnstr_printf(toConsole, " "); + if (flkey) + flkey = strdup(flkey); + mnstr_printf(toConsole, "CREATE %s ", ftkey); quoted_print(toConsole, sname, false); mnstr_printf(toConsole, "."); quoted_print(toConsole, fname, false); @@ -1488,38 +1468,9 @@ dump_function(Mapi mid, stream *toConsol } while (mapi_fetch_row(hdl) != 0); } mapi_close_handle(hdl); - mnstr_printf(toConsole, " LANGUAGE "); - switch (flang) { - case 3: - mnstr_printf(toConsole, "R"); - break; - case 4: - mnstr_printf(toConsole, "C"); - break; - case 5: - mnstr_printf(toConsole, "J"); - break; - case 6: - mnstr_printf(toConsole, "PYTHON"); - break; - case 7: - mnstr_printf(toConsole, "PYTHON_MAP"); - break; - case 8: - mnstr_printf(toConsole, "PYTHON2"); - break; - case 9: - mnstr_printf(toConsole, "PYTHON2_MAP"); - break; - case 10: - mnstr_printf(toConsole, "PYTHON3"); - break; - case 11: - mnstr_printf(toConsole, "PYTHON3_MAP"); - break; - default:/* unknown language */ - free(ffunc); - return -1; + if (flkey) { + mnstr_printf(toConsole, " LANGUAGE %s", flkey); + free(flkey); } mnstr_printf(toConsole, "\n%s\n", ffunc); free(ffunc); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Mar2018 - Indent.
Changeset: 3b091899277d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b091899277d Modified Files: sql/server/sql_parser.y Branch: Mar2018 Log Message: Indent. diffs (71 lines): diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -1860,20 +1860,19 @@ func_def: // code does not get cleaner than this people if (strcasecmp($10, "PYTHON_MAP") == 0) { lang = FUNC_LANG_MAP_PY; -} else if (strcasecmp($10, "PYTHON3_MAP") == 0) { - lang = FUNC_LANG_MAP_PY3; -} else if (strcasecmp($10, "PYTHON3") == 0) { - lang = FUNC_LANG_PY3; -} else if (strcasecmp($10, "PYTHON2_MAP") == 0) { - lang = FUNC_LANG_MAP_PY2; -} else if (strcasecmp($10, "PYTHON2") == 0) { - lang = FUNC_LANG_PY2; -} else { - lang = FUNC_LANG_PY; -} -} - else if (l == 'C' || l == 'c') { -if (strcasecmp($10, "CPP") == 0) { + } else if (strcasecmp($10, "PYTHON3_MAP") == 0) { + lang = FUNC_LANG_MAP_PY3; + } else if (strcasecmp($10, "PYTHON3") == 0) { + lang = FUNC_LANG_PY3; + } else if (strcasecmp($10, "PYTHON2_MAP") == 0) { + lang = FUNC_LANG_MAP_PY2; + } else if (strcasecmp($10, "PYTHON2") == 0) { + lang = FUNC_LANG_PY2; + } else { + lang = FUNC_LANG_PY; + } + } else if (l == 'C' || l == 'c') { + if (strcasecmp($10, "CPP") == 0) { lang = FUNC_LANG_CPP; } else { lang = FUNC_LANG_C; @@ -1939,20 +1938,19 @@ func_def: else if (l == 'P' || l == 'p') { if (strcasecmp($10, "PYTHON_MAP") == 0) { lang = FUNC_LANG_MAP_PY; -} else if (strcasecmp($10, "PYTHON3_MAP") == 0) { - lang = FUNC_LANG_MAP_PY3; -} else if (strcasecmp($10, "PYTHON3") == 0) { - lang = FUNC_LANG_PY3; -} else if (strcasecmp($10, "PYTHON2_MAP") == 0) { - lang = FUNC_LANG_MAP_PY2; -} else if (strcasecmp($10, "PYTHON2") == 0) { - lang = FUNC_LANG_PY2; -} else { - lang = FUNC_LANG_PY; -} -} -else if (l == 'C' || l == 'c') { -if (strcasecmp($10, "CPP") == 0) { + } else if (strcasecmp($10, "PYTHON3_MAP") == 0) { + lang = FUNC_LANG_MAP_PY3; + } else if (strcasecmp($10, "PYTHON3") == 0) { + lang = FUNC_LANG_PY3; + } else if (strcasecmp($10, "PYTHON2_MAP") == 0) { + lang = FUNC_LANG_MAP_PY2; + } else if (strcasecmp($10, "PYTHON2") == 0) { + lang = FUNC_LANG_PY2; + } else { + lang = FUNC_LANG_PY; + } + } else if (l == 'C' || l == 'c') { + if (strcasecmp($10, "CPP") == 0) { lang = FUNC_LANG_CPP; } else { lang = FUNC_LANG_C; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Mar2018 - Add a language keyword column to the function...
Changeset: 633e0dff08fd for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=633e0dff08fd Modified Files: sql/backends/monet5/sql_upgrades.c sql/scripts/51_sys_schema_extension.sql sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: Mar2018 Log Message: Add a language keyword column to the function_languages table. And stick the upgrade code in a more logical place. diffs (truncated from 1470 to 300 lines): diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -1280,6 +1280,34 @@ sql_update_mar2018(Client c, mvc *sql) "SET system = TRUE " "WHERE name = 'privilege_codes' " "AND schema_id = (SELECT id FROM sys.schemas WHERE name = 'sys');\n" + "ALTER TABLE sys.keywords SET READ WRITE;\n" + "INSERT INTO sys.keywords VALUES ('COMMENT'), ('CONTINUE'), ('START'), ('TRUNCATE');\n" + "ALTER TABLE sys.function_types SET READ WRITE;\n" + "ALTER TABLE function_types ADD COLUMN function_type_keyword VARCHAR(30);\n" + "UPDATE sys.function_types SET function_type_keyword =\n" + "(SELECT kw FROM (VALUES\n" + "(1, 'FUNCTION'),\n" + "(2, 'PROCEDURE'),\n" + "(3, 'AGGREGATE'),\n" + "(4, 'FILTER FUNCTION'),\n" + "(5, 'FUNCTION'),\n" + "(6, 'FUNCTION'),\n" + "(7, 'LOADER'))\n" + "AS ft (id, kw) WHERE function_type_id = id);\n" + "ALTER TABLE sys.function_types ALTER COLUMN function_type_keyword SET NOT NULL;\n" + "ALTER TABLE sys.function_languages SET READ WRITE;\n" + "ALTER TABLE sys.function_languages ADD COLUMN language_keyword VARCHAR(20);\n" + "UPDATE sys.function_languages SET language_keyword =\n" + "(SELECT kw FROM (VALUES\n" + "(3, 'R'),\n" + "(6, 'PYTHON'),\n" + "(7, 'PYTHON_MAP'),\n" + "(8, 'PYTHON2'),\n" + "(9, 'PYTHON2_MAP'),\n" + "(10, 'PYTHON3'),\n" + "(11, 'PYTHON3_MAP'))\n" + "AS ft (id, kw) WHERE language_id = id);\n" + "INSERT INTO sys.function_languages VALUES (4, 'C', 'C'), (12, 'C++', 'CPP');\n" ); /* 60_wlcr.sql */ @@ -1329,21 +1357,6 @@ sql_update_mar2018(Client c, mvc *sql) "AND schema_id = (SELECT id FROM sys.schemas WHERE name = 'sys');\n" "DELETE FROM sys.systemfunctions WHERE function_id IS NULL;\n" "ALTER TABLE sys.systemfunctions ALTER COLUMN function_id SET NOT NULL;\n" - "ALTER TABLE sys.keywords SET READ WRITE;\n" - "INSERT INTO sys.keywords VALUES ('COMMENT'), ('CONTINUE'), ('START'), ('TRUNCATE');\n" - "ALTER TABLE sys.function_types SET READ WRITE;\n" - "ALTER TABLE function_types ADD COLUMN function_type_keyword VARCHAR(30);\n" - "UPDATE
MonetDB: Mar2018 - No need to quote single quotes within double ...
Changeset: 9e5aee26325d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9e5aee26325d Modified Files: clients/mapiclient/mclient.c Branch: Mar2018 Log Message: No need to quote single quotes within double quotes. diffs (51 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -2543,12 +2543,12 @@ doFile(Mapi mid, stream *fp, bool useins "WITH describe_all_objects AS (\n" " SELECT s.name AS sname,\n" " t.name,\n" - " s.name || \'.\' || t.name AS fullname,\n" + " s.name || '.' || t.name AS fullname,\n" " CAST(CASE t.type\n" " WHEN 1 THEN 2 -- ntype for views\n" " ELSE 1\t -- ntype for tables\n" " END AS SMALLINT) AS ntype,\n" - " (CASE WHEN t.system THEN \'SYSTEM \' ELSE \'\' END) || tt.table_type_name AS type,\n" + " (CASE WHEN t.system THEN 'SYSTEM ' ELSE '' END) || tt.table_type_name AS type,\n" " t.system,\n" " c.remark AS remark\n" "FROM sys._tables t\n" @@ -2558,9 +2558,9 @@ doFile(Mapi mid, stream *fp, bool useins " UNION ALL\n" " SELECT s.name AS sname,\n" " sq.name,\n" - " s.name || \'.\' || sq.name AS fullname,\n" + " s.name || '.' || sq.name AS fullname,\n" " CAST(4 AS SMALLINT) AS ntype,\n" - " \'SEQUENCE\' AS type,\n" + " 'SEQUENCE' AS type,\n" " false AS system,\n" " c.remark AS remark\n" "FROM sys.sequences sq\n" @@ -2569,9 +2569,9 @@ doFile(Mapi mid, stream *fp, bool useins " UNION ALL\n" " SELECT DISTINCT s.name AS sname, -- DISTINCT is needed to filter out duplicate overloaded function/procedure names\n" " f.name,\n" - " s.name || \'.\' || f.name AS fullname,\n" + " s.name || '.' || f.name AS fullname,\n" " CAST(8 AS SMALLINT) AS ntype,\n" - " (CASE WHEN sf.function_id IS NOT NULL THEN \'SYSTEM \' ELSE \'\' END) || function_type_keyword AS type,\n" + " (CASE WHEN sf.function_id IS NOT NULL THEN 'SYSTEM ' ELSE '' END) || function_type_keyword AS type,\n" " sf.function_id IS NOT NULL AS system,\n" " c.remark AS remark\n" "FROM sys.functions f\n" @@ -2584,7 +2584,7 @@ doFile(Mapi mid, stream *fp, bool useins " s.name,\n" " s.name AS fullname,\n" " CAST(16 AS SMALLINT) AS ntype,\n" - " (CASE WHEN s.system THEN \'SYSTEM SCHEMA\' ELSE \'SCHEMA\' END) AS type,\n" + " (CASE WHEN s.system THEN 'SYSTEM SCHEMA' ELSE 'SCHEMA' END) AS type,\n" " s.system,\n" " c.remark AS remark\n"
MonetDB: Mar2018 - Improve queries.
Changeset: efd0c50a9f00 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=efd0c50a9f00 Modified Files: sql/test/emptydb/Tests/check.SQL.py sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 Branch: Mar2018 Log Message: Improve queries. Don't match on comments. diffs (95 lines): diff --git a/sql/test/emptydb/Tests/check.SQL.py b/sql/test/emptydb/Tests/check.SQL.py --- a/sql/test/emptydb/Tests/check.SQL.py +++ b/sql/test/emptydb/Tests/check.SQL.py @@ -67,11 +67,11 @@ create function pcre_replace(origin stri -- schemas select name, authorization, owner, system from sys.schemas order by name; -- _tables -select s.name, t.name, replace(replace(pcre_replace(pcre_replace(pcre_replace(t.query, '--.*\n', '', ''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', ')') as query, tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value as access from sys._tables t left outer join sys.schemas s on t.schema_id = s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at (id, value) on t.access = at.id order by s.name, t.name; +select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, '--.*\n*', '', ''), '[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value as access from sys._tables t left outer join sys.schemas s on t.schema_id = s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at (id, value) on t.access = at.id order by s.name, t.name; -- _columns select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default", c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id = c.table_id order by t.name, c.number; -- external functions that don't reference existing MAL function (should be empty) -with x (sname, name, modfunc) as (select s.name, f.name, pcre_replace(pcre_replace(pcre_replace(func, '--.*', '', ''), '.*external name (.*);.*', '$1', 'ims'), '"', '', '') from sys.functions f left outer join sys.schemas s on f.schema_id = s.id where func ilike '% external name %') select * from x where x.modfunc not in (select m.module || '.' || m."function" from sys.malfunctions() m); +with funcs as (select name, pcre_replace(func, '--.*\n*', '', '') as func, schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), '"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where f.func ilike '% external name %') select * from x where x.modfunc not in (select m.module || '.' || m."function" from sys.malfunctions() m); -- args ''' # generate a monster query to get all functions with all their diff --git a/sql/test/emptydb/Tests/check.stable.out b/sql/test/emptydb/Tests/check.stable.out --- a/sql/test/emptydb/Tests/check.stable.out +++ b/sql/test/emptydb/Tests/check.stable.out @@ -1303,11 +1303,11 @@ create function pcre_replace(origin stri -- schemas select name, authorization, owner, system from sys.schemas order by name; -- _tables -select s.name, t.name, replace(replace(pcre_replace(pcre_replace(pcre_replace(t.query, '--.*\n', '', ''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', ')') as query, tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value as access from sys._tables t left outer join sys.schemas s on t.schema_id = s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at (id, value) on t.access = at.id order by s.name, t.name; +select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, '--.*\n*', '', ''), '[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value as access from sys._tables t left outer join sys.schemas s on t.schema_id = s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left outer join
MonetDB: Mar2018 - Simplify and improve query.
Changeset: e5aee3f8fdbe for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5aee3f8fdbe Modified Files: sql/test/emptydb/Tests/check.SQL.py sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 Branch: Mar2018 Log Message: Simplify and improve query. Now we even properly ignore comments. diffs (99 lines): diff --git a/sql/test/emptydb/Tests/check.SQL.py b/sql/test/emptydb/Tests/check.SQL.py --- a/sql/test/emptydb/Tests/check.SQL.py +++ b/sql/test/emptydb/Tests/check.SQL.py @@ -71,7 +71,7 @@ select s.name, t.name, replace(replace(p -- _columns select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default", c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id = c.table_id order by t.name, c.number; -- external functions that don't reference existing MAL function (should be empty) -with x(name,func,schema_id) as (select name, split_part(func, ' external name ', 2), schema_id from sys.functions where func like '% external name %' union select name, split_part(func, ' EXTERNAL NAME ', 2), schema_id from sys.functions where func like '% EXTERNAL NAME %'), y(name,func,schema_id) as (select name, trim(split_part(func, ';', 1)), schema_id from x), z(name, mod, func, schema_id) as (select name, trim(split_part(func, '.', 1), '"'), trim(split_part(func, '.', 2), '"'), schema_id from y) select s.name, z.name, z.mod, z.func from z, sys.schemas s where z.mod || '.' || z.func not in (select m.module || '.' || m."function" from sys.malfunctions() m) and z.schema_id = s.id; +with x (sname, name, modfunc) as (select s.name, f.name, pcre_replace(pcre_replace(pcre_replace(func, '--.*', '', ''), '.*external name (.*);.*', '$1', 'ims'), '"', '', '') from sys.functions f left outer join sys.schemas s on f.schema_id = s.id where func ilike '% external name %') select * from x where x.modfunc not in (select m.module || '.' || m."function" from sys.malfunctions() m); -- args ''' # generate a monster query to get all functions with all their diff --git a/sql/test/emptydb/Tests/check.stable.out b/sql/test/emptydb/Tests/check.stable.out --- a/sql/test/emptydb/Tests/check.stable.out +++ b/sql/test/emptydb/Tests/check.stable.out @@ -1307,7 +1307,7 @@ select s.name, t.name, replace(replace(p -- _columns select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default", c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id = c.table_id order by t.name, c.number; -- external functions that don't reference existing MAL function (should be empty) -with x(name,func,schema_id) as (select name, split_part(func, ' external name ', 2), schema_id from sys.functions where func like '% external name %' union select name, split_part(func, ' EXTERNAL NAME ', 2), schema_id from sys.functions where func like '% EXTERNAL NAME %'), y(name,func,schema_id) as (select name, trim(split_part(func, ';', 1)), schema_id from x), z(name, mod, func, schema_id) as (select name, trim(split_part(func, '.', 1), '"'), trim(split_part(func, '.', 2), '"'), schema_id from y) select s.name, z.name, z.mod, z.func from z, sys.schemas s where z.mod || '.' || z.func not in (select m.module || '.' || m."function" from sys.malfunctions() m) and z.schema_id = s.id; +with x (sname, name, modfunc) as (select s.name, f.name, pcre_replace(pcre_replace(pcre_replace(func, '--.*', '', ''), '.*external name (.*);.*', '$1', 'ims'), '"', '', '') from sys.functions f left outer join sys.schemas s on f.schema_id = s.id where func ilike '% external name %') select * from x where x.modfunc not in (select m.module || '.' || m."function" from sys.malfunctions() m); -- args select s.name, f.name, replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, '--.*\n', '', ''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', ')') as query, f.mod, fl.language_name, ft.function_type_name, f.side_effect, f.varres, f.vararg, a0.name as name0, a0.type as type0, a0.type_digits as type_digits0, a0.type_scale as type_scale0, case a0.inout when 0 then 'out' when 1 then 'in' end as inout0, a1.name as name1, a1.type as type1, a1.type_digits as type_digits1, a1.type_scale as type_scale1, case a1.inout when 0 then 'out' when 1 then 'in' end as inout1, a2.name as name2, a2.type as type2, a2.type_digits as type_digits2, a2.type_scale as type_scale2, case a2.inout when 0 then 'out' when 1 then 'in' end as inout2, a3.name as name3, a3.type as type3, a3.type_digits as type_digits3, a3.type_scale as type_scale3, case a3.inout when 0 then 'out' when 1 then 'in' end as inout3, a4.name as name4, a4.type as type4, a4.type_digits as type_digits4, a4.type_scale as type_ scale4, case a4.inout when 0 then 'out' when 1 then 'in' end as inout4, a5.name as name5, a5.type as type5, a5.type_digits as type_digits5, a5.type_scale as type_scale5, case a5.inout when 0 then
MonetDB: Mar2018 - Reuse result.
Changeset: 07af1fbf68b7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07af1fbf68b7 Modified Files: monetdb5/modules/mal/pcre.c Branch: Mar2018 Log Message: Reuse result. diffs (12 lines): diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c --- a/monetdb5/modules/mal/pcre.c +++ b/monetdb5/modules/mal/pcre.c @@ -630,7 +630,7 @@ single_replace(pcre *pcre_code, pcre_ext len = 0; } else { off = ovector[backrefs[i].idx * 2]; - len = ovector[backrefs[i].idx * 2 + 1] - ovector[backrefs[i].idx * 2]; + len = ovector[backrefs[i].idx * 2 + 1] - off; } addlen = backrefs[i].start - prevend + len; if (len_result + addlen >= *max_result) { ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Mar2018 - Increment with correct value.
Changeset: c83ecc5c88ea for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c83ecc5c88ea Modified Files: monetdb5/modules/mal/pcre.c Branch: Mar2018 Log Message: Increment with correct value. diffs (12 lines): diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c --- a/monetdb5/modules/mal/pcre.c +++ b/monetdb5/modules/mal/pcre.c @@ -649,7 +649,7 @@ single_replace(pcre *pcre_code, pcre_ext } if (len > 0) { strncpy(result + len_result, origin_str + off, len); - len_result += off; + len_result += len; } prevend = backrefs[i].end; } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Don't allow threading when doing a loopback q...
Changeset: 7106bb2eafae for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7106bb2eafae Modified Files: sql/backends/monet5/UDF/pyapi/connection.c Branch: default Log Message: Don't allow threading when doing a loopback query. diffs (15 lines): diff --git a/sql/backends/monet5/UDF/pyapi/connection.c b/sql/backends/monet5/UDF/pyapi/connection.c --- a/sql/backends/monet5/UDF/pyapi/connection.c +++ b/sql/backends/monet5/UDF/pyapi/connection.c @@ -54,9 +54,9 @@ static PyObject *_connection_execute(Py_ PyObject *result; res_table *output = NULL; char *res = NULL; -Py_BEGIN_ALLOW_THREADS; +//Py_BEGIN_ALLOW_THREADS; res = _connection_query(self->cntxt, query, &output); -Py_END_ALLOW_THREADS; +//Py_END_ALLOW_THREADS; GDKfree(query); if (res != MAL_SUCCEED) { PyErr_Format(PyExc_Exception, "SQL Query Failed: %s", ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: data-vaults - Merge with default
Changeset: cca12f38c734 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cca12f38c734 Added Files: sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-wrong-cast-null.Bug-6551.sql sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 Removed Files: sql/scripts/97_comments.sql Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/mapiclient/dump.c clients/mapiclient/mclient.c configure.ag sql/backends/monet5/UDF/pyapi/connection.c sql/backends/monet5/UDF/pyapi/pyapi.c sql/backends/monet5/UDF/pyapi/pyapi.h sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.h sql/backends/monet5/sql.mal sql/backends/monet5/sql_cat.c sql/backends/monet5/sql_cat.h sql/backends/monet5/sql_upgrades.c sql/include/sql_relation.h sql/scripts/51_sys_schema_extension.sql sql/scripts/99_system.sql sql/scripts/Makefile.ag sql/server/sql_mvc.c sql/server/sql_privileges.c sql/storage/bat/bat_table.c sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.stable.out sql/test/BugTracker-2018/Tests/All sql/test/emptydb-upgrade-chain-hge/Tests/All sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/All sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-hge/Tests/All sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/All sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb/Tests/All sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 testing/README Branch: data-vaults Log Message: Merge with default diffs (truncated from 20348 to 300 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -10841,8 +10841,6 @@ Ready. [ "sql", "copy_from","pattern sql.copy_from(t:ptr, sep:str, rsep:str, ssep:str, ns:str, fname:str, nr:lng, offset:lng, locked:int, best:int, fwf:str):bat[:any]... ","mvc_import_table_wrap;", "Import a table from bstream s with the \n\tgiven tuple and seperators (sep/rsep)" ] [ "sql", "copy_rejects", "pattern sql.copy_rejects() (rowid:bat[:lng], fldid:bat[:int], msg:bat[:str], inp:bat[:str]) ", "COPYrejects;", "" ] [ "sql", "copy_rejects_clear", "pattern sql.copy_rejects_clear():void ", "COPYrejects_clear;", "" ] -[ "sql", "create_func_upgrade_oct2014", "pattern sql.create_func_upgrade_oct2014(sname:str, f:str):int ", "UPGcreate_func;", "Create the function described by f, needed for the Oct2014 upgrade"] -[ "sql", "create_view_upgrade_oct2014", "pattern sql.create_view_upgrade_oct2014(sname:str, v:str):int ", "UPGcreate_view;", "Create the view described by f, needed for the Oct2014 upgrade"] [ "sql", "createorderindex", "pattern sql.createorderindex(sch:str, tbl:str, col:str):void ","sql_createorderindex;","Instantiate the order index on a column" ] [ "sql", "current_time", "pattern sql.current_time():daytime ", "SQLcurrent_daytime;", "Get the clients current daytime" ] [ "sql", "current_timestamp","pattern sql.current_timestamp():timestamp ", "SQLcurrent_timestamp;","Get the clients current timestamp" ] @@ -10859,7 +10857,6 @@ Ready. [ "sql", "dense_rank", "pattern sql.dense_rank(b:any_1, p:bit, o:bit):int ", "SQLdense_rank;"
MonetDB: Mar2018 - Approved.
Changeset: 564935ebdad3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=564935ebdad3 Modified Files: sql/test/emptydb/Tests/check.stable.out Branch: Mar2018 Log Message: Approved. diffs (28 lines): diff --git a/sql/test/emptydb/Tests/check.stable.out b/sql/test/emptydb/Tests/check.stable.out --- a/sql/test/emptydb/Tests/check.stable.out +++ b/sql/test/emptydb/Tests/check.stable.out @@ -538,7 +538,6 @@ SYSTEM PROCEDUREsys.fitsattach SYSTEM PROCEDUREsys.fitsload SYSTEM FUNCTION sys.floor SYSTEM PROCEDUREsys.flush_log -SYSTEM FUNCTION sys.function_type_keyword SYSTEM FUNCTION sys.fuse SYSTEM FUNCTION sys.generate_series SYSTEM FUNCTION sys.geometrytype @@ -990,8 +989,6 @@ create procedure sys.evalalgebra(ra_stmt create procedure fitsattach(fname string) external name fits.attach; create procedure fitsload(tname string) external name fits.load; create procedure sys.flush_log () external name sql."flush_log"; -create function sys.function_type_keyword(ftype int) returns varchar(20) begin return case ftype when 1 then 'FUNCTION' when 2 then 'PROCEDURE' when 3 then 'AGGREGATE' when 4 then 'FILTER FUNCTION' when 5 then 'FUNCTION' when 6 then 'FUNCTION' when 7 then 'LOADER' else 'ROUTINE' end; -end; create function fuse(one integer, two integer) returns bigint external name udf.fuse; create function fuse(one smallint, two smallint) returns integer external name udf.fuse; create function fuse(one tinyint, two tinyint) returns smallint external name udf.fuse; @@ -2303,7 +2300,6 @@ drop function pcre_replace(string, strin [ "sys", "floor","floor","mmath","Internal C", "Scalar function", false, false, false, "res_0","double", 53, 0, "out", "arg_1","double", 53, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys", "floor","floor","mmath","Internal C", "Scalar function", false, false, false, "res_0","real", 24, 0, "out", "arg_1","real", 24, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL] [ "sys", "flush_log","create procedure sys.flush_log () external name sql.\"flush_log\";", "sql", "MAL", "Procedure",true, false, false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL] -[ "sys", "function_type_keyword","create function sys.function_type_keyword(ftype int) returns varchar(20) begin return case ftype when 1 then 'FUNCTION' when 2 then 'PROCEDURE' when 3 then 'AGGREGATE' when 4 then 'FILTER FUNCTION' when 5 then 'FUNCTION' when 6 then 'FUNCTION' when 7 then 'LOADER' else 'ROUTINE' end; end;","user", "SQL", "Scalar function", false, false, false, "result", "varchar", 20, 0, "out", "ftype","int", 32, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,