console: Hide timescaledb internal schema from data tab

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4439
Co-authored-by: Sooraj <8408875+soorajshankar@users.noreply.github.com>
GitOrigin-RevId: 49c746e8d23b87363462942d4823c7ab9de2744e
This commit is contained in:
Benoit Ranque 2022-06-22 04:37:08 -03:00 committed by hasura-bot
parent 98d899d4ba
commit e6614db17b
5 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,8 @@
### Bug fixes and improvements
console: Hide TimescaleDB internal schema from data tab
## v2.9.0-beta.1
### Event Triggers for MS SQL Server
@ -460,6 +462,7 @@ Response 2:
- server: allow casting most postgres scalar types to strings in comparison expressions (fix #8524)
- console: add remote database relationships for views
- console: bug fixes for RS-to-RS relationships
- console: exclude `_timescaledb_internal` from db introspection sql, for performance reasons ()
- console: allow users to remove prefix / suffix / root field namespace from a remote schema
- console: new "add remote schema" page (with GQL customization)
- console: fix console crash on adding pg sources with connection params through api

View File

@ -307,7 +307,7 @@ export const getComputedFieldsWithoutArgs = (
const schemaListSql = (
schemas?: string[]
) => `SELECT schema_name FROM information_schema.schemata WHERE
schema_name NOT IN ('information_schema', 'hdb_catalog', 'hdb_views') AND schema_name NOT LIKE 'pg\\_%'
schema_name NOT IN ('information_schema', 'hdb_catalog', 'hdb_views', '_timescaledb_internal') AND schema_name NOT LIKE 'pg\\_%'
${schemas?.length ? ` AND schema_name IN (${schemas.join(',')})` : ''}
ORDER BY schema_name ASC;`;

View File

@ -1301,7 +1301,7 @@ FROM (
FROM
information_schema.columns
WHERE
table_schema NOT in('information_schema', 'pg_catalog', 'hdb_catalog')
table_schema NOT in('information_schema', 'pg_catalog', 'hdb_catalog', '_timescaledb_internal')
AND table_schema NOT LIKE 'pg_toast%'
AND table_schema NOT LIKE 'pg_temp_%'
GROUP BY
@ -1335,7 +1335,7 @@ export const schemaListQuery = `
-- test_id = schema_list
SELECT schema_name FROM information_schema.schemata
WHERE
schema_name NOT in('information_schema', 'pg_catalog', 'hdb_catalog')
schema_name NOT in('information_schema', 'pg_catalog', 'hdb_catalog', '_timescaledb_internal')
AND schema_name NOT LIKE 'pg_toast%'
AND schema_name NOT LIKE 'pg_temp_%';
`;

View File

@ -131,7 +131,7 @@ FROM (
, 'hmac'
)
AND "function".function_schema NOT LIKE 'pg\_%'
AND "function".function_schema NOT IN ('information_schema', 'hdb_catalog')
AND "function".function_schema NOT IN ('information_schema', 'hdb_catalog', '_timescaledb_internal')
AND (NOT EXISTS (
SELECT
1

View File

@ -37,3 +37,5 @@ WHERE
AND t.table_schema <> 'information_schema'
AND t.table_schema <> 'hdb_catalog'
AND t.table_schema <> 'hdb_views'
AND t.table_schema <> '_timescaledb_internal'