Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped)
The following is the query which i used, i am using and i found an bug which is listing an newly created table (last week)
SELECT relnamespace::regnamespace::text AS schema_name, relname AS table_name
FROM pg_class c
WHERE NOT relispartition -- !
AND relkind = 'r' and lower(relnamespace::regnamespace::text) not in ('pg_catalog','partman','information_schema') and
lower(relnamespace::regnamespace::text) in ('XYZ')
order by relnamespace::regnamespace::text, relname ;