![JAR search and dependency download from the Maven repository](/logo.png)
sql.tables_without_description.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pg-index-health-core Show documentation
Show all versions of pg-index-health-core Show documentation
pg-index-health-core is a Java library for analyzing and maintaining indexes and tables health in PostgreSQL databases on a specific host.
/*
* Copyright (c) 2019-2024. Ivan Vakhrushev and others.
* https://github.com/mfvanek/pg-index-health-sql
*
* Licensed under the Apache License 2.0
*/
-- Finds tables that don't have a description. See also https://www.postgresql.org/docs/current/sql-comment.html
select
pc.oid::regclass::text as table_name,
pg_table_size(pc.oid) as table_size
from
pg_catalog.pg_class pc
inner join pg_catalog.pg_namespace nsp on nsp.oid = pc.relnamespace
where
pc.relkind = 'r' and
(obj_description(pc.oid) is null or length(trim(obj_description(pc.oid))) = 0) and
nsp.nspname = :schema_name_param::text
order by table_name;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy