简体   繁体   English

截断分区表 - PostgreSQL

[英]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)?我有一个名为 fact_sgw 的主表和一个名为 fact_sgw_2016_06 的子表,它只是 2016 年 6 月的数据。我可以截断子表而不丢失主表 (fact_sgw) 中的任何数据吗?

TRUNCATE TABLE <child_table_name> works fine on Postgres 14. TRUNCATE TABLE <child_table_name>在 Postgres 14 上运行良好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM