LCOV - code coverage report
Current view: top level - export/scratch1/home/monet/testing/b50e8e2d6f02-1-1-1/build/sql/backends/monet5 - 21_dependency_views.sql.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 2 100.0 %
Date: 2021-10-13 02:24:04 Functions: 1 1 100.0 %

          Line data    Source code
       1             : unsigned char _21_dependency_views_sql[17390] = {
       2             : "CREATE VIEW sys.ids (id, name, schema_id, table_id, table_name, obj_type, sys_table, system) AS\n"
       3             : "SELECT id, name, cast(null as int) as schema_id, cast(null as int) as table_id, cast(null as varchar(124)) as table_name, 'author' AS obj_type, 'sys.auths' AS sys_table, (name in ('public','sysadmin','monetdb','.snapshot')) AS system FROM sys.auths UNION ALL\n"
       4             : "SELECT id, name, cast(null as int) as schema_id, cast(null as int) as table_id, cast(null as varchar(124)) as table_name, ifthenelse(system, 'system schema', 'schema'), 'sys.schemas', system FROM sys.schemas UNION ALL\n"
       5             : "SELECT t.id, name, t.schema_id, t.id as table_id, t.name as table_name, cast(lower(tt.table_type_name) as varchar(40)), 'sys.tables', t.system FROM sys.tables t left outer join sys.table_types tt on t.type = tt.table_type_id UNION ALL\n"
       6             : "SELECT c.id, c.name, t.schema_id, c.table_id, t.name as table_name, ifthenelse(t.system, 'system column', 'column'), 'sys._columns', t.system FROM sys._columns c JOIN sys._tables t ON c.table_id = t.id UNION ALL\n"
       7             : "SELECT c.id, c.name, t.schema_id, c.table_id, t.name as table_name, 'column', 'tmp._columns', t.system FROM tmp._columns c JOIN tmp._tables t ON c.table_id = t.id UNION ALL\n"
       8             : "SELECT k.id, k.name, t.schema_id, k.table_id, t.name as table_name, ifthenelse(t.system, 'system key', 'key'), 'sys.keys', t.system FROM sys.keys k JOIN sys._tables t ON k.table_id = t.id UNION ALL\n"
       9             : "SELECT k.id, k.name, t.schema_id, k.table_id, t.name as table_name, 'key', 'tmp.keys', t.system FROM tmp.keys k JOIN tmp._tables t ON k.table_id = t.id UNION ALL\n"
      10             : "SELECT i.id, i.name, t.schema_id, i.table_id, t.name as table_name, ifthenelse(t.system, 'system index', 'index'), 'sys.idxs', t.system FROM sys.idxs i JOIN sys._tables t ON i.table_id = t.id UNION ALL\n"
      11             : "SELECT i.id, i.name, t.schema_id, i.table_id, t.name as table_name, 'index' , 'tmp.idxs', t.system FROM tmp.idxs i JOIN tmp._tables t ON i.table_id = t.id UNION ALL\n"
      12             : "SELECT g.id, g.name, t.schema_id, g.table_id, t.name as table_name, ifthenelse(t.system, 'system trigger', 'trigger'), 'sys.triggers', t.system FROM sys.triggers g JOIN sys._tables t ON g.table_id = t.id UNION ALL\n"
      13             : "SELECT g.id, g.name, t.schema_id, g.table_id, t.name as table_name, 'trigger', 'tmp.triggers', t.system FROM tmp.triggers g JOIN tmp._tables t ON g.table_id = t.id UNION ALL\n"
      14             : "SELECT f.id, f.name, f.schema_id, cast(null as int) as table_id, cast(null as varchar(124)) as table_name, cast(ifthenelse(f.system, 'system ', '') || lower(ft.function_type_keyword) as varchar(40)), 'sys.functions', f.system FROM sys.functions f left outer join sys.function_types ft on f.type = ft.function_type_id UNION ALL\n"
      15             : "SELECT a.id, a.name, f.schema_id, a.func_id as table_id, f.name as table_name, cast(ifthenelse(f.system, 'system ', '') || lower(ft.function_type_keyword) || ' arg' as varchar(44)), 'sys.args', f.system FROM sys.args a JOIN sys.functions f ON a.func_id = f.id left outer join sys.function_types ft on f.type = ft.function_type_id UNION ALL\n"
      16             : "SELECT id, name, schema_id, cast(null as int) as table_id, cast(null as varchar(124)) as table_name, 'sequence', 'sys.sequences', false FROM sys.sequences UNION ALL\n"
      17             : "SELECT o.id, o.name, pt.schema_id, pt.id, pt.name, 'partition of merge table', 'sys.objects', false FROM sys.objects o JOIN sys._tables pt ON o.sub = pt.id JOIN sys._tables mt ON o.nr = mt.id WHERE mt.type = 3 UNION ALL\n"
      18             : "SELECT id, sqlname, schema_id, cast(null as int) as table_id, cast(null as varchar(124)) as table_name, 'type', 'sys.types', (sqlname in ('inet','json','url','uuid')) FROM sys.types WHERE id > 2000\n"
      19             : " ORDER BY id;\n"
      20             : "GRANT SELECT ON sys.ids TO PUBLIC;\n"
      21             : "CREATE TABLE sys.dependency_types (\n"
      22             : "    dependency_type_id   SMALLINT NOT NULL PRIMARY KEY,\n"
      23             : "    dependency_type_name VARCHAR(15) NOT NULL UNIQUE);\n"
      24             : "INSERT INTO sys.dependency_types (dependency_type_id, dependency_type_name) VALUES\n"
      25             : "  (1, 'SCHEMA'),\n"
      26             : "  (2, 'TABLE'),\n"
      27             : "  (3, 'COLUMN'),\n"
      28             : "  (4, 'KEY'),\n"
      29             : "  (5, 'VIEW'),\n"
      30             : "  (6, 'USER'),\n"
      31             : "  (7, 'FUNCTION'),\n"
      32             : "  (8, 'TRIGGER'),\n"
      33             : "  (9, 'OWNER'),\n"
      34             : "  (10, 'INDEX'),\n"
      35             : "  (11, 'FKEY'),\n"
      36             : "  (12, 'SEQUENCE'),\n"
      37             : "  (13, 'PROCEDURE'),\n"
      38             : "  (14, 'BE_DROPPED'),\n"
      39             : "  (15, 'TYPE');\n"
      40             : "ALTER TABLE sys.dependency_types SET READ ONLY;\n"
      41             : "GRANT SELECT ON sys.dependency_types TO PUBLIC;\n"
      42             : "CREATE VIEW sys.dependencies_vw AS\n"
      43             : "SELECT d.id, i1.obj_type, i1.name,\n"
      44             : "       d.depend_id as used_by_id, i2.obj_type as used_by_obj_type, i2.name as used_by_name,\n"
      45             : "       d.depend_type, dt.dependency_type_name\n"
      46             : "  FROM sys.dependencies d\n"
      47             : "  JOIN sys.ids i1 ON d.id = i1.id\n"
      48             : "  JOIN sys.ids i2 ON d.depend_id = i2.id\n"
      49             : "  JOIN sys.dependency_types dt ON d.depend_type = dt.dependency_type_id\n"
      50             : " ORDER BY id, depend_id;\n"
      51             : "GRANT SELECT ON sys.dependencies_vw TO PUBLIC;\n"
      52             : "CREATE VIEW sys.dependency_owners_on_schemas AS\n"
      53             : "SELECT a.name AS owner_name, s.id AS schema_id, s.name AS schema_name, CAST(1 AS smallint) AS depend_type\n"
      54             : "  FROM sys.schemas AS s, sys.auths AS a\n"
      55             : " WHERE s.owner = a.id\n"
      56             : " ORDER BY a.name, s.name;\n"
      57             : "GRANT SELECT ON sys.dependency_owners_on_schemas TO PUBLIC;\n"
      58             : "CREATE VIEW sys.dependency_columns_on_keys AS\n"
      59             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, c.id AS column_id, c.name AS column_name, k.id AS key_id, k.name AS key_name, CAST(kc.nr +1 AS int) AS key_col_nr, CAST(k.type AS smallint) AS key_type, CAST(4 AS smallint) AS depend_type\n"
      60             : "  FROM sys.columns AS c, sys.objects AS kc, sys.keys AS k, sys.tables AS t\n"
      61             : " WHERE k.table_id = c.table_id AND c.table_id = t.id AND kc.id = k.id AND kc.name = c.name\n"
      62             : "   AND k.type IN (0, 1)\n"
      63             : " ORDER BY t.schema_id, t.name, c.name, k.type, k.name, kc.nr;\n"
      64             : "GRANT SELECT ON sys.dependency_columns_on_keys TO PUBLIC;\n"
      65             : "CREATE VIEW sys.dependency_tables_on_views AS\n"
      66             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, v.schema_id AS view_schema_id, v.id AS view_id, v.name AS view_name, dep.depend_type AS depend_type\n"
      67             : "  FROM sys.tables AS t, sys.tables AS v, sys.dependencies AS dep\n"
      68             : " WHERE t.id = dep.id AND v.id = dep.depend_id\n"
      69             : "   AND dep.depend_type = 5 AND t.type NOT IN (1, 11) AND v.type IN (1, 11)\n"
      70             : " ORDER BY t.schema_id, t.name, v.schema_id, v.name;\n"
      71             : "GRANT SELECT ON sys.dependency_tables_on_views TO PUBLIC;\n"
      72             : "CREATE VIEW sys.dependency_views_on_views AS\n"
      73             : "SELECT v1.schema_id AS view1_schema_id, v1.id AS view1_id, v1.name AS view1_name, v2.schema_id AS view2_schema_id, v2.id AS view2_id, v2.name AS view2_name, dep.depend_type AS depend_type\n"
      74             : "  FROM sys.tables AS v1, sys.tables AS v2, sys.dependencies AS dep\n"
      75             : " WHERE v1.id = dep.id AND v2.id = dep.depend_id\n"
      76             : "   AND dep.depend_type = 5 AND v1.type IN (1, 11) AND v2.type IN (1, 11)\n"
      77             : " ORDER BY v1.schema_id, v1.name, v2.schema_id, v2.name;\n"
      78             : "GRANT SELECT ON sys.dependency_views_on_views TO PUBLIC;\n"
      79             : "CREATE VIEW sys.dependency_columns_on_views AS\n"
      80             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, c.id AS column_id, c.name AS column_name, v.schema_id AS view_schema_id, v.id AS view_id, v.name AS view_name, dep.depend_type AS depend_type\n"
      81             : "  FROM sys.columns AS c, sys.tables AS v, sys.tables AS t, sys.dependencies AS dep\n"
      82             : " WHERE c.id = dep.id AND v.id = dep.depend_id AND c.table_id = t.id\n"
      83             : "   AND dep.depend_type = 5 AND v.type IN (1, 11)\n"
      84             : " ORDER BY t.schema_id, t.name, c.name, v.name;\n"
      85             : "GRANT SELECT ON sys.dependency_columns_on_views TO PUBLIC;\n"
      86             : "CREATE VIEW sys.dependency_functions_on_views AS\n"
      87             : "SELECT f.schema_id AS function_schema_id, f.id AS function_id, f.name AS function_name, v.schema_id AS view_schema_id, v.id AS view_id, v.name AS view_name, dep.depend_type AS depend_type\n"
      88             : "  FROM sys.functions AS f, sys.tables AS v, sys.dependencies AS dep\n"
      89             : " WHERE f.id = dep.id AND v.id = dep.depend_id\n"
      90             : "   AND dep.depend_type = 5 AND v.type IN (1, 11)\n"
      91             : " ORDER BY f.schema_id, f.name, v.schema_id, v.name;\n"
      92             : "GRANT SELECT ON sys.dependency_functions_on_views TO PUBLIC;\n"
      93             : "CREATE VIEW sys.dependency_schemas_on_users AS\n"
      94             : "SELECT s.id AS schema_id, s.name AS schema_name, u.name AS user_name, CAST(6 AS smallint) AS depend_type\n"
      95             : "  FROM sys.users AS u, sys.schemas AS s\n"
      96             : " WHERE u.default_schema = s.id\n"
      97             : " ORDER BY s.name, u.name;\n"
      98             : "GRANT SELECT ON sys.dependency_schemas_on_users TO PUBLIC;\n"
      99             : "CREATE VIEW sys.dependency_tables_on_functions AS\n"
     100             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, f.name AS function_name, f.type AS function_type, dep.depend_type AS depend_type\n"
     101             : "  FROM sys.functions AS f, sys.tables AS t, sys.dependencies AS dep\n"
     102             : " WHERE t.id = dep.id AND f.id = dep.depend_id\n"
     103             : "   AND dep.depend_type = 7 AND f.type <> 2 AND t.type NOT IN (1, 11)\n"
     104             : " ORDER BY t.name, t.schema_id, f.name, f.id;\n"
     105             : "GRANT SELECT ON sys.dependency_tables_on_functions TO PUBLIC;\n"
     106             : "CREATE VIEW sys.dependency_views_on_functions AS\n"
     107             : "SELECT v.schema_id AS view_schema_id, v.id AS view_id, v.name AS view_name, f.name AS function_name, f.type AS function_type, dep.depend_type AS depend_type\n"
     108             : "  FROM sys.functions AS f, sys.tables AS v, sys.dependencies AS dep\n"
     109             : " WHERE v.id = dep.id AND f.id = dep.depend_id\n"
     110             : "   AND dep.depend_type = 7 AND f.type <> 2 AND v.type IN (1, 11)\n"
     111             : " ORDER BY v.name, v.schema_id, f.name, f.id;\n"
     112             : "GRANT SELECT ON sys.dependency_views_on_functions TO PUBLIC;\n"
     113             : "CREATE VIEW sys.dependency_columns_on_functions AS\n"
     114             : "SELECT c.table_id, c.id AS column_id, c.name, f.id AS function_id, f.name AS function_name, f.type AS function_type, dep.depend_type AS depend_type\n"
     115             : "  FROM sys.functions AS f, sys.columns AS c, sys.dependencies AS dep\n"
     116             : " WHERE c.id = dep.id AND f.id = dep.depend_id\n"
     117             : "   AND dep.depend_type = 7 AND f.type <> 2\n"
     118             : " ORDER BY c.name, c.table_id, f.name, f.id;\n"
     119             : "GRANT SELECT ON sys.dependency_columns_on_functions TO PUBLIC;\n"
     120             : "CREATE VIEW sys.dependency_functions_on_functions AS\n"
     121             : "SELECT f1.schema_id, f1.id AS function_id, f1.name AS function_name, f1.type AS function_type,\n"
     122             : "       f2.schema_id AS used_in_function_schema_id, f2.id AS used_in_function_id, f2.name AS used_in_function_name, f2.type AS used_in_function_type, dep.depend_type AS depend_type\n"
     123             : "  FROM sys.functions AS f1, sys.functions AS f2, sys.dependencies AS dep\n"
     124             : " WHERE f1.id = dep.id AND f2.id = dep.depend_id\n"
     125             : "   AND dep.depend_type = 7 AND f2.type <> 2\n"
     126             : " ORDER BY f1.name, f1.id, f2.name, f2.id;\n"
     127             : "GRANT SELECT ON sys.dependency_functions_on_functions TO PUBLIC;\n"
     128             : "CREATE VIEW sys.dependency_tables_on_triggers AS\n"
     129             : "(SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, tri.id AS trigger_id, tri.name AS trigger_name, CAST(8 AS smallint) AS depend_type\n"
     130             : "  FROM sys.tables AS t, sys.triggers AS tri\n"
     131             : " WHERE tri.table_id = t.id)\n"
     132             : "UNION\n"
     133             : "(SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, tri.id AS trigger_id, tri.name AS trigger_name, dep.depend_type AS depend_type\n"
     134             : "  FROM sys.tables AS t, sys.triggers AS tri, sys.dependencies AS dep\n"
     135             : " WHERE dep.id = t.id AND dep.depend_id = tri.id\n"
     136             : "   AND dep.depend_type = 8)\n"
     137             : " ORDER BY table_schema_id, table_name, trigger_name;\n"
     138             : "GRANT SELECT ON sys.dependency_tables_on_triggers TO PUBLIC;\n"
     139             : "CREATE VIEW sys.dependency_columns_on_triggers AS\n"
     140             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, tri.id AS trigger_id, tri.name AS trigger_name, c.id AS column_id, c.name AS column_name, dep.depend_type AS depend_type\n"
     141             : "  FROM sys.tables AS t, sys.columns AS c, sys.triggers AS tri, sys.dependencies AS dep\n"
     142             : " WHERE dep.id = c.id AND dep.depend_id = tri.id AND c.table_id = t.id\n"
     143             : "   AND dep.depend_type = 8\n"
     144             : " ORDER BY t.schema_id, t.name, tri.name, c.name;\n"
     145             : "GRANT SELECT ON sys.dependency_columns_on_triggers TO PUBLIC;\n"
     146             : "CREATE VIEW sys.dependency_functions_on_triggers AS\n"
     147             : "SELECT f.schema_id AS function_schema_id, f.id AS function_id, f.name AS function_name, f.type AS function_type,\n"
     148             : "       tri.id AS trigger_id, tri.name AS trigger_name, tri.table_id AS trigger_table_id, dep.depend_type AS depend_type\n"
     149             : "  FROM sys.functions AS f, sys.triggers AS tri, sys.dependencies AS dep\n"
     150             : " WHERE dep.id = f.id AND dep.depend_id = tri.id\n"
     151             : "   AND dep.depend_type = 8\n"
     152             : " ORDER BY f.schema_id, f.name, tri.name;\n"
     153             : "GRANT SELECT ON sys.dependency_functions_on_triggers TO PUBLIC;\n"
     154             : "CREATE VIEW sys.dependency_tables_on_indexes AS\n"
     155             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, i.id AS index_id, i.name AS index_name, i.type AS index_type, CAST(10 AS smallint) AS depend_type\n"
     156             : "  FROM sys.tables AS t, sys.idxs AS i\n"
     157             : " WHERE i.table_id = t.id\n"
     158             : "   AND (i.table_id, i.name) NOT IN (SELECT k.table_id, k.name FROM sys.keys k)\n"
     159             : " ORDER BY t.schema_id, t.name, i.name;\n"
     160             : "GRANT SELECT ON sys.dependency_tables_on_indexes TO PUBLIC;\n"
     161             : "CREATE VIEW sys.dependency_columns_on_indexes AS\n"
     162             : "SELECT c.id AS column_id, c.name AS column_name, t.id AS table_id, t.name AS table_name, t.schema_id, i.id AS index_id, i.name AS index_name, i.type AS index_type, CAST(ic.nr +1 AS INT) AS seq_nr, CAST(10 AS smallint) AS depend_type\n"
     163             : "  FROM sys.tables AS t, sys.columns AS c, sys.objects AS ic, sys.idxs AS i\n"
     164             : " WHERE ic.name = c.name AND ic.id = i.id AND c.table_id = i.table_id AND c.table_id = t.id\n"
     165             : "   AND (i.table_id, i.name) NOT IN (SELECT k.table_id, k.name FROM sys.keys k)\n"
     166             : " ORDER BY c.name, t.name, t.schema_id, i.name, ic.nr;\n"
     167             : "GRANT SELECT ON sys.dependency_columns_on_indexes TO PUBLIC;\n"
     168             : "CREATE VIEW sys.dependency_tables_on_foreignkeys AS\n"
     169             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, fk.name AS fk_name, CAST(k.type AS smallint) AS key_type, CAST(11 AS smallint) AS depend_type\n"
     170             : "  FROM sys.tables AS t, sys.keys AS k, sys.keys AS fk\n"
     171             : " WHERE fk.rkey = k.id and k.table_id = t.id\n"
     172             : " ORDER BY t.schema_id, t.name, fk.name;\n"
     173             : "GRANT SELECT ON sys.dependency_tables_on_foreignkeys TO PUBLIC;\n"
     174             : "CREATE VIEW sys.dependency_keys_on_foreignkeys AS\n"
     175             : "SELECT k.table_id AS key_table_id, k.id AS key_id, k.name AS key_name, fk.table_id AS fk_table_id, fk.id AS fk_id, fk.name AS fk_name, CAST(k.type AS smallint) AS key_type, CAST(11 AS smallint) AS depend_type\n"
     176             : "  FROM sys.keys AS k, sys.keys AS fk\n"
     177             : " WHERE k.id = fk.rkey\n"
     178             : " ORDER BY k.name, fk.name;\n"
     179             : "GRANT SELECT ON sys.dependency_keys_on_foreignkeys TO PUBLIC;\n"
     180             : "CREATE VIEW sys.dependency_tables_on_procedures AS\n"
     181             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, p.id AS procedure_id, p.name AS procedure_name, p.type AS procedure_type, dep.depend_type AS depend_type\n"
     182             : "  FROM sys.functions AS p, sys.tables AS t, sys.dependencies AS dep\n"
     183             : " WHERE t.id = dep.id AND p.id = dep.depend_id\n"
     184             : "   AND dep.depend_type = 13 AND p.type = 2 AND t.type NOT IN (1, 11)\n"
     185             : " ORDER BY t.name, t.schema_id, p.name, p.id;\n"
     186             : "GRANT SELECT ON sys.dependency_tables_on_procedures TO PUBLIC;\n"
     187             : "CREATE VIEW sys.dependency_views_on_procedures AS\n"
     188             : "SELECT v.schema_id AS view_schema_id, v.id AS view_id, v.name AS view_name, p.id AS procedure_id, p.name AS procedure_name, p.type AS procedure_type, dep.depend_type AS depend_type\n"
     189             : "  FROM sys.functions AS p, sys.tables AS v, sys.dependencies AS dep\n"
     190             : " WHERE v.id = dep.id AND p.id = dep.depend_id\n"
     191             : "   AND dep.depend_type = 13 AND p.type = 2 AND v.type IN (1, 11)\n"
     192             : " ORDER BY v.name, v.schema_id, p.name, p.id;\n"
     193             : "GRANT SELECT ON sys.dependency_views_on_procedures TO PUBLIC;\n"
     194             : "CREATE VIEW sys.dependency_columns_on_procedures AS\n"
     195             : "SELECT c.table_id, c.id AS column_id, c.name AS column_name, p.id AS procedure_id, p.name AS procedure_name, p.type AS procedure_type, dep.depend_type AS depend_type\n"
     196             : "  FROM sys.functions AS p, sys.columns AS c, sys.dependencies AS dep\n"
     197             : " WHERE c.id = dep.id AND p.id = dep.depend_id\n"
     198             : "   AND dep.depend_type = 13 AND p.type = 2\n"
     199             : " ORDER BY c.name, c.table_id, p.name, p.id;\n"
     200             : "GRANT SELECT ON sys.dependency_columns_on_procedures TO PUBLIC;\n"
     201             : "CREATE VIEW sys.dependency_functions_on_procedures AS\n"
     202             : "SELECT f.schema_id AS function_schema_id, f.id AS function_id, f.name AS function_name, f.type AS function_type,\n"
     203             : "       p.schema_id AS procedure_schema_id, p.id AS procedure_id, p.name AS procedure_name, p.type AS procedure_type, dep.depend_type AS depend_type\n"
     204             : "  FROM sys.functions AS p, sys.functions AS f, sys.dependencies AS dep\n"
     205             : " WHERE f.id = dep.id AND p.id = dep.depend_id\n"
     206             : "   AND dep.depend_type = 13 AND p.type = 2\n"
     207             : " ORDER BY p.name, p.id, f.name, f.id;\n"
     208             : "GRANT SELECT ON sys.dependency_functions_on_procedures TO PUBLIC;\n"
     209             : "CREATE VIEW sys.dependency_columns_on_types AS\n"
     210             : "SELECT t.schema_id AS table_schema_id, t.id AS table_id, t.name AS table_name, dt.id AS type_id, dt.sqlname AS type_name, c.id AS column_id, c.name AS column_name, dep.depend_type AS depend_type\n"
     211             : "  FROM sys.tables AS t, sys.columns AS c, sys.types AS dt, sys.dependencies AS dep\n"
     212             : " WHERE dep.id = dt.id AND dep.depend_id = c.id AND c.table_id = t.id\n"
     213             : "   AND dep.depend_type = 15\n"
     214             : " ORDER BY dt.sqlname, t.name, c.name, c.id;\n"
     215             : "GRANT SELECT ON sys.dependency_columns_on_types TO PUBLIC;\n"
     216             : "CREATE VIEW sys.dependency_functions_on_types AS\n"
     217             : "SELECT dt.id AS type_id, dt.sqlname AS type_name, f.id AS function_id, f.name AS function_name, f.type AS function_type, dep.depend_type AS depend_type\n"
     218             : "  FROM sys.functions AS f, sys.types AS dt, sys.dependencies AS dep\n"
     219             : " WHERE dep.id = dt.id AND dep.depend_id = f.id\n"
     220             : "   AND dep.depend_type = 15\n"
     221             : " ORDER BY dt.sqlname, f.name, f.id;\n"
     222             : "GRANT SELECT ON sys.dependency_functions_on_types TO PUBLIC;\n"
     223             : "CREATE VIEW sys.dependency_args_on_types AS\n"
     224             : "SELECT dt.id AS type_id, dt.sqlname AS type_name, f.id AS function_id, f.name AS function_name, a.id AS arg_id, a.name AS arg_name, a.number AS arg_nr, dep.depend_type AS depend_type\n"
     225             : "  FROM sys.args AS a, sys.functions AS f, sys.types AS dt, sys.dependencies AS dep\n"
     226             : " WHERE dep.id = dt.id AND dep.depend_id = a.id AND a.func_id = f.id\n"
     227             : "   AND dep.depend_type = 15\n"
     228             : " ORDER BY dt.sqlname, f.name, a.number, a.name;\n"
     229             : "GRANT SELECT ON sys.dependency_args_on_types TO PUBLIC;\n"
     230             : };
     231             : #include "monetdb_config.h"
     232             : #include "sql_import.h"
     233             : #ifdef _MSC_VER
     234             : #undef read
     235             : #pragma section(".CRT$XCU",read)
     236             : #endif
     237         256 : LIB_STARTUP_FUNC(init_21_dependency_views_sql)
     238         256 : { sql_register("21_dependency_views", _21_dependency_views_sql); }

Generated by: LCOV version 1.14