Changeset: b974160fb2cb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b974160fb2cb
Modified Files:
        sql/scripts/15_querylog.sql
        sql/scripts/16_tracelog.sql
        sql/scripts/22_clients.sql
        sql/scripts/25_debug.sql
        sql/scripts/26_sysmon.sql
        sql/scripts/75_storagemodel.sql
        sql/scripts/80_statistics.sql
        sql/scripts/99_system.sql
Branch: default
Log Message:

All tables, schemas, functions that exist at end of init are system tables, 
schemas, functions.


diffs (129 lines):

diff --git a/sql/scripts/15_querylog.sql b/sql/scripts/15_querylog.sql
--- a/sql/scripts/15_querylog.sql
+++ b/sql/scripts/15_querylog.sql
@@ -69,11 +69,6 @@ select qd.*, ql."start",ql."stop", ql.ar
 from sys.querylog_catalog() qd, sys.querylog_calls() ql
 where qd.id = ql.id and qd.owner = user;
 
-update sys._tables
-    set system = true
-    where name in ('querylog_history', 'querylog_calls', 'querylog_catalog')
-        and schema_id = (select id from sys.schemas where name = 'sys');
-
 -- reset history for a particular user
 create procedure sys.querylog_empty()
 external name sql.querylog_empty;
diff --git a/sql/scripts/16_tracelog.sql b/sql/scripts/16_tracelog.sql
--- a/sql/scripts/16_tracelog.sql
+++ b/sql/scripts/16_tracelog.sql
@@ -34,7 +34,3 @@ create function sys.tracelog()
        external name sql.dump_trace;
 
 create view sys.tracelog as select * from sys.tracelog();
-update sys._tables
-    set system = true
-    where name = 'tracelog'
-        and schema_id = (select id from sys.schemas where name = 'sys');
diff --git a/sql/scripts/22_clients.sql b/sql/scripts/22_clients.sql
--- a/sql/scripts/22_clients.sql
+++ b/sql/scripts/22_clients.sql
@@ -23,10 +23,6 @@ create function sys.sessions()
 returns table("user" string, "login" timestamp, "sessiontimeout" bigint, 
"lastcommand" timestamp, "querytimeout" bigint, "active" bool)
 external name sql.sessions;
 create view sys.sessions as select * from sys.sessions();
-update sys._tables
-    set system = true
-    where name = 'sessions'
-        and schema_id = (select id from sys.schemas where name = 'sys');
 
 create procedure sys.shutdown(delay tinyint) 
 external name sql.shutdown;
diff --git a/sql/scripts/25_debug.sql b/sql/scripts/25_debug.sql
--- a/sql/scripts/25_debug.sql
+++ b/sql/scripts/25_debug.sql
@@ -45,11 +45,6 @@ create function sys.environment()
        external name sql.sql_environment;
 create view sys.environment as select * from sys.environment();
 
-update sys._tables
-    set system = true
-    where name in ( 'environment', 'optimizers')
-        and schema_id = (select id from sys.schemas where name = 'sys');
-
 -- The BAT buffer pool overview
 create function sys.bbp () 
        returns table (id int, name string, htype string, 
diff --git a/sql/scripts/26_sysmon.sql b/sql/scripts/26_sysmon.sql
--- a/sql/scripts/26_sysmon.sql
+++ b/sql/scripts/26_sysmon.sql
@@ -32,10 +32,6 @@ returns table(
 external name sql.sysmon_queue;
 
 create view sys.queue as select * from sys.queue();
-update sys._tables
-    set system = true
-    where name = 'queue'
-        and schema_id = (select id from sys.schemas where name = 'sys');
 
 -- operations to manipulate the state of havoc queries
 create procedure sys.pause(tag int)
diff --git a/sql/scripts/75_storagemodel.sql b/sql/scripts/75_storagemodel.sql
--- a/sql/scripts/75_storagemodel.sql
+++ b/sql/scripts/75_storagemodel.sql
@@ -49,10 +49,6 @@ create table sys.storagemodelinput(
        "reference" boolean,-- used as foreign key reference
        "sorted" boolean        -- if set there is no need for an index
 );
-update sys._tables
-       set system = true
-       where name = 'storagemodelinput'
-               and schema_id = (select id from sys.schemas where name = 'sys');
 -- this table can be adjusted to reflect the anticipated final database size
 
 -- The model input can be derived from the current database using
@@ -181,8 +177,3 @@ as select "schema","table",max(count) as
        sum(imprints) as imprints,
        sum(case when sorted = false then 8 * count else 0 end) as auxillary
 from sys.storagemodel() group by "schema","table";
-
-update sys._tables
-       set system = true
-       where name in ('tablestoragemodel', 'storagemodel', 'storage')
-               and schema_id = (select id from sys.schemas where name = 'sys');
diff --git a/sql/scripts/80_statistics.sql b/sql/scripts/80_statistics.sql
--- a/sql/scripts/80_statistics.sql
+++ b/sql/scripts/80_statistics.sql
@@ -35,11 +35,6 @@ CREATE TABLE sys.statistics(
        maxval string,
        sorted boolean);
 
-update sys._tables
-       set system = true
-       where name = 'statistics'
-               and schema_id = (select id from sys.schemas where name = 'sys');
-
 create procedure analyze()
 external name sql.analyze;
 
diff --git a/sql/scripts/99_system.sql b/sql/scripts/99_system.sql
--- a/sql/scripts/99_system.sql
+++ b/sql/scripts/99_system.sql
@@ -15,13 +15,13 @@
 -- Copyright August 2008-2014 MonetDB B.V.
 -- All Rights Reserved.
 
+-- only system functions until now
 create table systemfunctions (function_id)
        as (select id from functions) with data;
 grant select on systemfunctions to public;
-update _tables
-       set system = true
-       where name = 'systemfunctions'
-               and schema_id = (select id from schemas where name = 'sys');
 
--- sofar only system schemas
+-- only system tables until now
+update _tables set system = true;
+
+-- only system schemas until now
 update schemas set system = true;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to