请有人检查我的代码以了解为什么会出现语法错误
桌子:
CREATE TABLE post_partitioned (
pk integer,
title TEXT,
content TEXT,
author INTEGER,
category INTEGER,
reply_to INTEGER,
created_on TIMESTAMP WITH TIME ZONE,
last_edited_on TIMESTAMP WITH TIME ZONE,
editable BOOLEAN,
likes INTEGER,
CONSTRAINT created UNIQUE ( pk, created_on )
)
PARTITION BY RANGE (created_on);
表达:
ALTER TABLE post_partitioned ALTER COLUMN pk TYPE int GENERATED ALWAYS AS IDENTITY
文档: https: //www.postgresql.org/docs/current/sql-altertable.html