Sample Header Ad - 728x90

SQL query to get the names of the partitions which are detached from the parent table in postgres?

1 vote
1 answer
757 views
I used pg_partman to create and drop partitions from my 2 postgres tables. Since there existed a foreign key relations among the tables, I couldn't drop the tables using partman(does not allow). However, I was able to detach the older partitioned tables(data older than 30 days) from the parent table. Now, in order to clean these tables, I need to get the names of the detached tables. What sql query would help me achieve this ?
Asked by Kushagra Kumar (11 rep)
Jun 24, 2024, 07:15 PM
Last activity: Jun 6, 2025, 07:03 PM