Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped) - Mailing list pgsql-general

From Bharani SV-forum
Subject Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped)
Date
Msg-id 98965993.3138805.1731699978332@mail.yahoo.com
Whole thread Raw
In response to Re: postgresql-17.0-1 Application - silent installation Issue  (Rob Sargent <robjsargent@gmail.com>)
Responses Re: Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped)
Re: Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped)
Help in vetting my steps for Postgres DB upgrade from Ver 13.X to ver 15.X
List pgsql-general
 Team

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 ;

pgsql-general by date:

Previous
From: Vincent Veyron
Date:
Subject: Re: Retrieve filename within a script
Next
From: "David G. Johnston"
Date:
Subject: Re: Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped)