[英]Django postgresql adminer import sql file syntax error
Firstly I exported the database in sql file and without changing anything, I tried to import same sql file to empty postgresql database using adminer.首先,我在 sql 文件中导出了数据库,在不做任何更改的情况下,我尝试使用管理员将相同的 sql 文件导入到空的 postgresql 数据库中。 But I get some errors and don't know what is the problem
但是我得到了一些错误,不知道是什么问题
VERSION: postgres:14.6版本: postgres:14.6
ERROR IS LIKE THAT:错误是这样的:
CREATE TABLE "public"."auth_group" (
"id" integer DEFAULT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
"name" character varying(150) NOT NULL,
CONSTRAINT "auth_group_name_key" UNIQUE ("name"),
CONSTRAINT "auth_group_pkey" PRIMARY KEY ("id")
) WITH (oids = false)
Error in query (7): ERROR: syntax error at or near "BY"
LINE 2: "id" integer DEFAULT GENERATED BY DEFAULT AS IDENTITY NO...
Any ideas?有任何想法吗?
As documented in the manual the correct syntax is:如手册中所述,正确的语法是:
id" integer GENERATED BY DEFAULT AS IDENTITY NOT NULL,
The DEFAULT
after integer
is wrong. integer
之后的DEFAULT
是错误的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.