From 280f83a75ef9569adf01434d57ae93ff7359119e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=93=81?= Date: Sun, 18 Apr 2021 17:12:11 +0800 Subject: [PATCH] add testcase for #4223 --- .../druid/bvt/sql/postgresql/PostgresqlResourceTest.java | 4 ++++ src/test/resources/bvt/parser/postgresql-12.txt | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 src/test/resources/bvt/parser/postgresql-12.txt diff --git a/src/test/java/com/alibaba/druid/bvt/sql/postgresql/PostgresqlResourceTest.java b/src/test/java/com/alibaba/druid/bvt/sql/postgresql/PostgresqlResourceTest.java index e27b029e56..d62828b2c2 100644 --- a/src/test/java/com/alibaba/druid/bvt/sql/postgresql/PostgresqlResourceTest.java +++ b/src/test/java/com/alibaba/druid/bvt/sql/postgresql/PostgresqlResourceTest.java @@ -84,6 +84,10 @@ public class PostgresqlResourceTest extends PGTest { exec_test("bvt/parser/postgresql-11.txt"); } + public void test_12() throws Exception { + exec_test("bvt/parser/postgresql-12.txt"); + } + public void exec_test(String resource) throws Exception { System.out.println(resource); InputStream is = null; diff --git a/src/test/resources/bvt/parser/postgresql-12.txt b/src/test/resources/bvt/parser/postgresql-12.txt new file mode 100644 index 0000000000..67357d8e42 --- /dev/null +++ b/src/test/resources/bvt/parser/postgresql-12.txt @@ -0,0 +1,4 @@ +select max(tmp1)::varchar from test01; +--------------------------- +SELECT max(tmp1)::varchar +FROM test01; \ No newline at end of file