Changeset: 73db971f835b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/73db971f835b Modified Files: sql/backends/monet5/sql_upgrades.c Branch: insertonly Log Message:
Upgrade code for insertonly_persist function. diffs (26 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 @@ -6160,6 +6160,22 @@ sql_update_default(Client c, mvc *sql, s err = SQLstatementIntern(c, cmds, "update", true, false, NULL); } + /* 77_storage.sql */ + if (!sql_bind_func_(sql, s->base.name, "insertonly_persist", NULL, F_UNION, true)) { + sql->session->status = 0; + sql->errstr[0] = '\0'; + const char *query = + "create function sys.insertonly_persist()\n" + "returns table(\"table\" string, \"table_id\" bigint, \"rowcount\" bigint)\n" + "external name sql.insertonly_persist;\n" + "grant execute on function sys.insertonly_persist() to public;\n" + "update sys.functions set system = true where system <> true and\n" + "name = 'insertonly_persist' and schema_id = 2000;\n"; + printf("Running database upgrade commands:\n%s\n", query); + fflush(stdout); + err = SQLstatementIntern(c, query, "update", true, false, NULL); + } + return err; } _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org