Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Truncate partitioned table - PostgreSQL

I have a master table called fact_sgw and have a child table called fact_sgw_2016_06 which is just data for June 2016. Could I truncate the child table without losing any data from the master table (fact_sgw)?

like image 369
theOGloc Avatar asked Nov 15 '25 10:11

theOGloc


1 Answers

TRUNCATE TABLE <child_table_name> works fine on Postgres 14.

like image 146
Binita Bharati Avatar answered Nov 17 '25 10:11

Binita Bharati