From 4cc55247a68080ba99f8c2784687fc60180742c8 Mon Sep 17 00:00:00 2001 From: Amit Shani Date: Wed, 8 Jun 2022 16:50:36 +0300 Subject: [PATCH] ignore internal crdb schemas (#850) --- sql/postgres/inspect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/postgres/inspect.go b/sql/postgres/inspect.go index 6e8a6c4d70c..10a557241e5 100644 --- a/sql/postgres/inspect.go +++ b/sql/postgres/inspect.go @@ -829,7 +829,7 @@ const ( paramsQuery = `SELECT setting FROM pg_settings WHERE name IN ('lc_collate', 'lc_ctype', 'server_version_num', 'crdb_version') ORDER BY name DESC` // Query to list database schemas. - schemasQuery = "SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ('information_schema', 'pg_catalog', 'pg_toast') AND schema_name NOT LIKE 'pg_%temp_%' ORDER BY schema_name" + schemasQuery = "SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ('information_schema', 'pg_catalog', 'pg_toast', 'crdb_internal', 'pg_extension') AND schema_name NOT LIKE 'pg_%temp_%' ORDER BY schema_name" // Query to list specific database schemas. schemasQueryArgs = "SELECT schema_name FROM information_schema.schemata WHERE schema_name %s ORDER BY schema_name"