PostgreSQL PSQLException: ERROR: syntax error at or near "user"

PostgreSQL About 215 words

错误原因

使用PostgreSQL创建表时,使用了user关键字。

解决方法

方法一

使用双引号包裹,即:"user"

Hibernate可以设置属性自动添加双引号:hibernate.auto_quote_keywordtrue

方法二

使用其他表明,如:sys_user

所有关键字

https://www.postgresql.org/docs/current/sql-keywords-appendix.html

Views: 362 · Posted: 2023-10-25

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh