SHOW commands provide a convenient way to inspect database objects, their properties, and metadata in Materialize. These commands are similar to PostgreSQL’s \d commands but work in any SQL client.
-- Show columns of a tableSHOW COLUMNS FROM orders;-- Show the SQL used to create a viewSHOW CREATE VIEW my_view;-- Show indexes on a specific objectSHOW INDEXES ON orders;
-- Show all sources and their statusSHOW SOURCES;-- Check subsources for a PostgreSQL sourceSHOW SUBSOURCES FROM pg_source;-- Verify materialized views existSHOW MATERIALIZED VIEWS LIKE 'orders%';-- Check if indexes are definedSHOW INDEXES ON order_totals;
-- List all clusters and their replicasSHOW CLUSTERS;SHOW CLUSTER REPLICAS;-- Find objects on a specific clusterSELECT name, type FROM mz_catalog.mz_objectsWHERE cluster_id = ( SELECT id FROM mz_catalog.mz_clusters WHERE name = 'my_cluster');
-- List all rolesSHOW ROLES;-- Show role membershipSHOW ROLE MEMBERSHIP;-- List secrets (names only, not values)SHOW SECRETS;-- Show connectionsSHOW CONNECTIONS;