postgresql是否支持双参数limit SQL语句?

看一下以下查询:

highgo=# select * from te2 limit 5;
 id |  name  
----+--------
  1 | highgo
  2 | highgo
  3 | highgo
  4 | highgo
  5 | highgo
(5 rows)

highgo=# select * from te2 limit 5,1;
ERROR:  42601: LIMIT #,# syntax is not supported at character 19
HINT:  Use separate LIMIT and OFFSET clauses.
STATEMENT:  select * from te2 limit 5,1;
ERROR:  42601: LIMIT #,# syntax is not supported
LINE 1: select * from te2 limit 5,1;
                          ^
HINT:  Use separate LIMIT and OFFSET clauses.

可以发现直接报错,提示使用单独的LIMIT和OFFSET子句。

参考如下社区讨论通过补丁是否解决此问题(暂未验证):https://www.drupal.org/node/1335644


BY  海无涯

你可能感兴趣的:(PostgreSQL,Highgo,DB)