我正在尝试使用从某一天开始计算的周数重新分区一些表:
my_fact
table 包含一个名为time_stamp
type的字段TIMESTAMPTZ
不幸的是,重新分区不起作用,我收到了错误:
MyDB=> ALTER TABLE my_fact PARTITION BY MOD(TIMESTAMPDIFF('day', time_stamp::TIMESTAMP, TIMESTAMP '2013-09-23'), 156) REORGANIZE;
NOTICE 4954: The new partitioning scheme will produce 12 partitions
ROLLBACK 2552: Cannot use meta function or non-deterministic function in PARTITION BY expression
是否应该从该字段time_stamp
中TIMESTAMP
删除任何与时区相关的信息,从而使其具有确定性?
谢谢!