You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
原来的实现下,auto_increment仅仅是GENERATED BY DEFAULT AS IDENTITY的语法糖。为了
区别于GENERATED ...,现在重新定义auto_increment如下:
-- 创建自增列的方式1(内部自动为其产生一个序列,并绑定到自增列上)
CREATE TABLE public.t2 (
a integer AUTO_INCREMENT
)
WITH (shard='1');
-- 创建自增列的方式2(便于pg_dump的导入)
CREATE TABLE public.t2 (
a integer NOT NULL
)
WITH (shard='1');
ALTER TABLE public.t2 ALTER COLUMN a ADD AUTO_INCREMENT (
SEQUENCE NAME public.t2_a_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
SHARD 1
);
-- 创建自增列的方式3
create table t3(
a integer AUTO_INCREMENT (
SEQUENCE NAME public.t2_a_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
SHARD 1
)
);
*Issue migrated from trac ticket # 882 www.kunlunbase.com *
component: computing nodes | priority: major
2022-07-07 14:59:38: zhaowei@zettadb.com created the issue
The text was updated successfully, but these errors were encountered: