Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped)

From: Bharani SV-forum <esteembsv-forum(at)yahoo(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped)
Date: 2024-11-15 19:46:18
Message-ID: 98965993.3138805.1731699978332@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2024-11-15 19:56:54 Re: Need exact SQL query to find List of Detach Partitioned Tables (Yet to be Dropped)
Previous Message Vincent Veyron 2024-11-15 16:29:30 Re: Retrieve filename within a script