You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the schema page (/queries/schema) does not display the views and materialized views, which is a pity in my opinion.
Here is the query we use to get those in Postgres:
SELECT n.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
pg_catalog.format_type(a.atttypid, a.atttypmod) AS data_type,
a.attnum AS ordinal_position,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment
FROM pg_catalog.pg_attribute a
JOIN pg_catalog.pg_class c ON a.attrelid = c.oid
JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid
WHERE c.relkind IN ('r', 'v', 'm')
AND a.attnum > 0
AND NOT a.attisdropped
AND n.nspname NOT IN ('pg_catalog', 'information_schema')
ORDER BY table_schema, table_name, ordinal_position
If you are interested @ankane , I can open a PR for the sql_adapter to run this postgres.
The text was updated successfully, but these errors were encountered:
I noticed that the schema page (
/queries/schema
) does not display the views and materialized views, which is a pity in my opinion.Here is the query we use to get those in Postgres:
If you are interested @ankane , I can open a PR for the sql_adapter to run this postgres.
The text was updated successfully, but these errors were encountered: