您的位置:首页 > 游戏 > 手游 > postgresql搭建

postgresql搭建

2024/12/23 4:38:18 来源:https://blog.csdn.net/Rio520/article/details/140108147  浏览:    关键词:postgresql搭建

搭建postgresql-11.3,和客户端工具

1,准备对应的包,右键直接下一步安装完即可, 将postgresql设置为本地服务,方便启动,

2,用对应客户端软件连接,新建一个数据库controlDB 新建用户lzkj 密码lzkj123 设为controlDB的所有者 再新建目前总控上面用到的两张表


```sql
1、Controller_Users: //用户表
CREATE UNLOGGED TABLE public."Controller_Users"
("UserID" bigint NOT NULL,"UserName" character varying(128) NOT NULL,"PassWord" character varying(128) NOT NULL,"Nullity" character varying(1) NOT NULL,"MobilePhone" character varying(11) NOT NULL,"CreateTime" timestamp(6) with time zone,CONSTRAINT "Controller_Users_pkey" PRIMARY KEY ("UserID")
)
WITH (OIDS=FALSE
);
ALTER TABLE public."Controller_Users"OWNER TO test;
COMMENT ON TABLE public."Controller_Users"IS '总表';
第二张表
2、Owner//1表
CREATE UNLOGGED TABLE public."Owner"
("ID" bigint NOT NULL,"OwnerID" character varying(64) NOT NULL,"OwnerName" character varying(64) NOT NULL,"ServerIP" character varying(32) NOT NULL,"ServerPost" character varying(4) NOT NULL DEFAULT 80,"Telephone" character varying(11) NOT NULL,"CreationTime" character varying(64),CONSTRAINT "Owner_pkey" PRIMARY KEY ("ID")
)
WITH (OIDS=FALSE
);
ALTER TABLE public."Owner"OWNER TO test;
COMMENT ON TABLE public."Owner"IS '1表';
######
新建两个序列:
CREATE SEQUENCE public.controller_userid_seqINCREMENT 1MINVALUE 1MAXVALUE 999999START 4CACHE 1;
ALTER TABLE public.controller_userid_seqOWNER TO test;
第二个
CREATE SEQUENCE public.owner_id_seqINCREMENT 1MINVALUE 1MAXVALUE 999999START 1CACHE 1;
ALTER TABLE public.owner_id_seqOWNER TO test

告诉web端对应的ip端口用户密码

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com