修复PostgreSQL数据库下,添加项目成员和全文搜索时发生的SQL语法兼容性错误 #986
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
问题
排查
数据库使用
PostgreSQL
,版本为v15.8
。应为数据库的SQL语法不兼容导致的问题。pq: 不支持 LIMIT #,# 语法
/docs/odoo_dev/search
报错{"errcode":6002,"message":"搜索结果错误"}
解决
LIMIT 10 OFFSET 0
,以代替简写形式的LIMIT 0,10
SQL语句,使其更具兼容性。OR "release" LIKE ?
代替OR `release` LIKE ?
语句,使其更具兼容性。