gpt4 book ai didi

PostgreSQL:错误: "NOT"处或附近的语法错误

转载 作者:行者123 更新时间:2023-11-29 14:08:04 25 4
gpt4 key购买 nike

这可能有什么问题(从 Docker 容器使用 CentOS 上的 PostgreSQL 9.2.24):

terminate called after throwing an instance of 'pqxx::syntax_error'
what(): ERROR: syntax error at or near "NOT"
LINE 1: ...olver_fit_length BIGINT NOT NULL);CREATE INDEX IF NOT EXISTS...
^

同样的代码在我的主机 Ubuntu 18.04 和 PostgreSQL 10 上运行良好,所以我不确定要修复什么以及在哪里修复。

最佳答案

“IF NOT EXISTS”已在 PostgreSQL 9.5 中引入-版本 9.2 不支持它 -> https://www.postgresql.org/docs/9.2/sql-createindex.htmlhttps://www.postgresql.org/docs/9.5/sql-createindex.html .

关于PostgreSQL:错误: "NOT"处或附近的语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58937961/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com