postgresql 中的分区

Partition in postgresql

各位!

我是 postgresql 的新手,尝试对现有的 table 进行分区。 所以我想要像

这样的东西

alter table t1 partition by range (c_date);

但在分区处或分区附近出现语法错误。 我也尝试添加 start from 并得到同样的错误。 我可以分区 table 而不创建新分区吗?

因此,您无法将现有的非分区 table 更改为分区 table,有关更多详细信息:

如果您想了解有关将现有 table 迁移到分区 table 的更多信息,您可以阅读以下内容:

https://dba.stackexchange.com/questions/106014/how-to-partition-existing-table-in-postgres