未验证 提交 d5290b0c 编写于 作者: J Juan Pan(Trista) 提交者: GitHub

Merge pull request #3994 from SteNicholas/postgresql-current-user

PostgreSQL current user
......@@ -55,4 +55,5 @@
<sql-case id="select_with_mod_function" value="SELECT * FROM t_order WHERE MOD(order_id, 1) = 1" db-types="MySQL" />
<sql-case id="select_with_date_format_function" value="SELECT * FROM t_order WHERE DATE_FORMAT(current_date, '%Y-%m-%d') = '2019-12-18'" db-types="MySQL" />
<sql-case id="select_with_spatial_function" value="SELECT * FROM t_order WHERE ST_DISTANCE_SPHERE(POINT(113.358772, 23.1273723), POINT(user_id,order_id)) != 0" db-types="MySQL" />
<sql-case id="select_current_user" value="SELECT CURRENT_USER" db-types="PostgreSQL"/>
</sql-cases>
......@@ -203,6 +203,7 @@ simpleExpr
| EXISTS? subquery
| LBE_ identifier expr RBE_
| caseExpression_
| CURRENT_USER
;
functionCall
......
......@@ -1048,4 +1048,12 @@
</shorthand-select-items>
</select-items>
</parser-result>
<parser-result sql-case-id="select_current_user">
<select-items start-index="7" stop-index="19">
<expression-items>
<expression-item start-index="7" stop-index="19" text="CURRENT_USER"/>
</expression-items>
</select-items>
</parser-result>
</parser-result-sets>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册