mz_catalog.slt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. # This file is auto-generated by ci/test/lint-docs-catalog.py
  10. mode cockroach
  11. statement ok
  12. CREATE VIEW objects AS
  13. SELECT
  14. schema.name AS schema,
  15. objects.name AS object,
  16. columns.position,
  17. columns.name,
  18. columns.type
  19. FROM
  20. mz_catalog.mz_columns AS columns,
  21. mz_catalog.mz_objects AS objects,
  22. mz_catalog.mz_schemas AS schema
  23. WHERE columns.id = objects.id AND objects.schema_id = schema.id
  24. statement ok
  25. CREATE INDEX objects_idx ON objects(schema, object)
  26. query ITT
  27. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_array_types' ORDER BY position
  28. ----
  29. 1 id text
  30. 2 element_id text
  31. query ITT
  32. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_audit_events' ORDER BY position
  33. ----
  34. 1 id uint8
  35. 2 event_type text
  36. 3 object_type text
  37. 4 details jsonb
  38. 5 user text
  39. 6 occurred_at timestamp␠with␠time␠zone
  40. query ITT
  41. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_aws_privatelink_connections' ORDER BY position
  42. ----
  43. 1 id text
  44. 2 principal text
  45. query ITT
  46. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_base_types' ORDER BY position
  47. ----
  48. 1 id text
  49. query ITT
  50. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_cluster_replica_frontiers' ORDER BY position
  51. ----
  52. 1 object_id text
  53. 2 replica_id text
  54. 3 write_frontier mz_timestamp
  55. query ITT
  56. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_cluster_replica_sizes' ORDER BY position
  57. ----
  58. 1 size text
  59. 2 processes uint8
  60. 3 workers uint8
  61. 4 cpu_nano_cores uint8
  62. 5 memory_bytes uint8
  63. 6 disk_bytes uint8
  64. 7 credits_per_hour numeric
  65. query ITT
  66. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_cluster_replicas' ORDER BY position
  67. ----
  68. 1 id text
  69. 2 name text
  70. 3 cluster_id text
  71. 4 size text
  72. 5 availability_zone text
  73. 6 owner_id text
  74. 7 disk boolean
  75. query ITT
  76. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_clusters' ORDER BY position
  77. ----
  78. 1 id text
  79. 2 name text
  80. 3 owner_id text
  81. 4 privileges mz_aclitem[]
  82. 5 managed boolean
  83. 6 size text
  84. 7 replication_factor uint4
  85. 8 disk boolean
  86. 9 availability_zones list
  87. 10 introspection_debugging boolean
  88. 11 introspection_interval interval
  89. query ITT
  90. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_columns' ORDER BY position
  91. ----
  92. 1 id text
  93. 2 name text
  94. 3 position uint8
  95. 4 nullable boolean
  96. 5 type text
  97. 6 default text
  98. 7 type_oid oid
  99. 8 type_mod integer
  100. query ITT
  101. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_connections' ORDER BY position
  102. ----
  103. 1 id text
  104. 2 oid oid
  105. 3 schema_id text
  106. 4 name text
  107. 5 type text
  108. 6 owner_id text
  109. 7 privileges mz_aclitem[]
  110. 8 create_sql text
  111. 9 redacted_create_sql text
  112. query ITT
  113. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_databases' ORDER BY position
  114. ----
  115. 1 id text
  116. 2 oid oid
  117. 3 name text
  118. 4 owner_id text
  119. 5 privileges mz_aclitem[]
  120. query ITT
  121. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_default_privileges' ORDER BY position
  122. ----
  123. 1 role_id text
  124. 2 database_id text
  125. 3 schema_id text
  126. 4 object_type text
  127. 5 grantee text
  128. 6 privileges text
  129. query ITT
  130. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_egress_ips' ORDER BY position
  131. ----
  132. 1 egress_ip text
  133. 2 prefix_length integer
  134. 3 cidr text
  135. query ITT
  136. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_functions' ORDER BY position
  137. ----
  138. 1 id text
  139. 2 oid oid
  140. 3 schema_id text
  141. 4 name text
  142. 5 argument_type_ids text[]
  143. 6 variadic_argument_type_id text
  144. 7 return_type_id text
  145. 8 returns_set boolean
  146. 9 owner_id text
  147. query ITT
  148. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_indexes' ORDER BY position
  149. ----
  150. 1 id text
  151. 2 oid oid
  152. 3 name text
  153. 4 on_id text
  154. 5 cluster_id text
  155. 6 owner_id text
  156. 7 create_sql text
  157. 8 redacted_create_sql text
  158. query ITT
  159. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_index_columns' ORDER BY position
  160. ----
  161. 1 index_id text
  162. 2 index_position uint8
  163. 3 on_position uint8
  164. 4 on_expression text
  165. 5 nullable boolean
  166. query ITT
  167. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_kafka_connections' ORDER BY position
  168. ----
  169. 1 id text
  170. 2 brokers text[]
  171. 3 sink_progress_topic text
  172. query ITT
  173. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_kafka_sinks' ORDER BY position
  174. ----
  175. 1 id text
  176. 2 topic text
  177. query ITT
  178. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_kafka_sources' ORDER BY position
  179. ----
  180. 1 id text
  181. 2 group_id_prefix text
  182. 3 topic text
  183. query ITT
  184. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_list_types' ORDER BY position
  185. ----
  186. 1 id text
  187. 2 element_id text
  188. 3 element_modifiers list
  189. query ITT
  190. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_map_types' ORDER BY position
  191. ----
  192. 1 id text
  193. 2 key_id text
  194. 3 value_id text
  195. 4 key_modifiers list
  196. 5 value_modifiers list
  197. query ITT
  198. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_materialized_views' ORDER BY position
  199. ----
  200. 1 id text
  201. 2 oid oid
  202. 3 schema_id text
  203. 4 name text
  204. 5 cluster_id text
  205. 6 definition text
  206. 7 owner_id text
  207. 8 privileges mz_aclitem[]
  208. 9 create_sql text
  209. 10 redacted_create_sql text
  210. query ITT
  211. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_objects' ORDER BY position
  212. ----
  213. 1 id text
  214. 2 oid oid
  215. 3 schema_id text
  216. 4 name text
  217. 5 type text
  218. 6 owner_id text
  219. 7 cluster_id text
  220. 8 privileges mz_aclitem[]
  221. query ITT
  222. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_pseudo_types' ORDER BY position
  223. ----
  224. 1 id text
  225. query ITT
  226. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_relations' ORDER BY position
  227. ----
  228. 1 id text
  229. 2 oid oid
  230. 3 schema_id text
  231. 4 name text
  232. 5 type text
  233. 6 owner_id text
  234. 7 cluster_id text
  235. 8 privileges mz_aclitem[]
  236. query ITT
  237. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_recent_storage_usage' ORDER BY position
  238. ----
  239. 1 object_id text
  240. 2 size_bytes uint8
  241. query ITT
  242. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_roles' ORDER BY position
  243. ----
  244. 1 id text
  245. 2 oid oid
  246. 3 name text
  247. 4 inherit boolean
  248. query ITT
  249. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_role_members' ORDER BY position
  250. ----
  251. 1 role_id text
  252. 2 member text
  253. 3 grantor text
  254. query ITT
  255. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_role_parameters' ORDER BY position
  256. ----
  257. 1 role_id text
  258. 2 parameter_name text
  259. 3 parameter_value text
  260. query ITT
  261. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_schemas' ORDER BY position
  262. ----
  263. 1 id text
  264. 2 oid oid
  265. 3 database_id text
  266. 4 name text
  267. 5 owner_id text
  268. 6 privileges mz_aclitem[]
  269. query ITT
  270. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_secrets' ORDER BY position
  271. ----
  272. 1 id text
  273. 2 oid oid
  274. 3 schema_id text
  275. 4 name text
  276. 5 owner_id text
  277. 6 privileges mz_aclitem[]
  278. query ITT
  279. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_ssh_tunnel_connections' ORDER BY position
  280. ----
  281. 1 id text
  282. 2 public_key_1 text
  283. 3 public_key_2 text
  284. query ITT
  285. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_sinks' ORDER BY position
  286. ----
  287. 1 id text
  288. 2 oid oid
  289. 3 schema_id text
  290. 4 name text
  291. 5 type text
  292. 6 connection_id text
  293. 7 size text
  294. 8 envelope_type text
  295. 9 format text
  296. 10 key_format text
  297. 11 value_format text
  298. 12 cluster_id text
  299. 13 owner_id text
  300. 14 create_sql text
  301. 15 redacted_create_sql text
  302. query ITT
  303. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_sources' ORDER BY position
  304. ----
  305. 1 id text
  306. 2 oid oid
  307. 3 schema_id text
  308. 4 name text
  309. 5 type text
  310. 6 connection_id text
  311. 7 size text
  312. 8 envelope_type text
  313. 9 key_format text
  314. 10 value_format text
  315. 11 cluster_id text
  316. 12 owner_id text
  317. 13 privileges mz_aclitem[]
  318. 14 create_sql text
  319. 15 redacted_create_sql text
  320. query ITT
  321. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_storage_usage' ORDER BY position
  322. ----
  323. 1 object_id text
  324. 2 size_bytes uint8
  325. 3 collection_timestamp timestamp␠with␠time␠zone
  326. query ITT
  327. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_system_privileges' ORDER BY position
  328. ----
  329. 1 privileges mz_aclitem
  330. query ITT
  331. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_tables' ORDER BY position
  332. ----
  333. 1 id text
  334. 2 oid oid
  335. 3 schema_id text
  336. 4 name text
  337. 5 owner_id text
  338. 6 privileges mz_aclitem[]
  339. 7 create_sql text
  340. 8 redacted_create_sql text
  341. 9 source_id text
  342. query ITT
  343. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_timezone_abbreviations' ORDER BY position
  344. ----
  345. 1 abbreviation text
  346. 2 utc_offset interval
  347. 3 dst boolean
  348. 4 timezone_name text
  349. query ITT
  350. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_timezone_names' ORDER BY position
  351. ----
  352. 1 name text
  353. query ITT
  354. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_types' ORDER BY position
  355. ----
  356. 1 id text
  357. 2 oid oid
  358. 3 schema_id text
  359. 4 name text
  360. 5 category text
  361. 6 owner_id text
  362. 7 privileges mz_aclitem[]
  363. 8 create_sql text
  364. 9 redacted_create_sql text
  365. query ITT
  366. SELECT position, name, type FROM objects WHERE schema = 'mz_catalog' AND object = 'mz_views' ORDER BY position
  367. ----
  368. 1 id text
  369. 2 oid oid
  370. 3 schema_id text
  371. 4 name text
  372. 5 definition text
  373. 6 owner_id text
  374. 7 privileges mz_aclitem[]
  375. 8 create_sql text
  376. 9 redacted_create_sql text
  377. query T
  378. SELECT DISTINCT object FROM objects WHERE schema IN ('mz_catalog') ORDER BY object
  379. ----
  380. mz_array_types
  381. mz_audit_events
  382. mz_aws_privatelink_connections
  383. mz_base_types
  384. mz_cluster_replica_frontiers
  385. mz_cluster_replica_sizes
  386. mz_cluster_replicas
  387. mz_clusters
  388. mz_columns
  389. mz_connections
  390. mz_databases
  391. mz_default_privileges
  392. mz_egress_ips
  393. mz_functions
  394. mz_index_columns
  395. mz_indexes
  396. mz_kafka_connections
  397. mz_kafka_sinks
  398. mz_kafka_sources
  399. mz_list_types
  400. mz_map_types
  401. mz_materialized_views
  402. mz_objects
  403. mz_operators
  404. mz_pseudo_types
  405. mz_recent_storage_usage
  406. mz_relations
  407. mz_role_members
  408. mz_role_parameters
  409. mz_roles
  410. mz_schemas
  411. mz_secrets
  412. mz_sinks
  413. mz_sources
  414. mz_ssh_tunnel_connections
  415. mz_storage_usage
  416. mz_system_privileges
  417. mz_tables
  418. mz_timezone_abbreviations
  419. mz_timezone_names
  420. mz_types
  421. mz_views