首页 > 解决方案 > 无法让 Postgres 表分区工作

问题描述

我在 Windows 上运行 postgres 9.5.7。

我正在尝试使用...创建分区表

CREATE TABLE processlog2
(
  processlogid integer NOT NULL DEFAULT 
  nextval('processlog_processlogid_seq'::regclass),
  starttime timestamp without time zone,
  endtime timestamp without time zone,
  durationsecs integer,
  processname character(100),
  itemcount integer,
  comment character(255),
  params character varying(20)
)
PARTITION BY RANGE (starttime );

我得到了错误......

ERROR:  syntax error at or near "PARTITION"
LINE 12: PARTITION BY RANGE (starttime );

我认为 Postgres 多年来一直支持分区,但我找不到任何关于此错误的提及,并且不确定我做错了什么。

有任何想法吗?

谢谢

标签: postgresqlpartitioning

解决方案


推荐阅读