summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_postgres.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:21:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:21:50 +0000
commit6c774776db5e016d597e582c7006ba8d27006f9d (patch)
tree8a65b7a9938002f9b152d9a6dfd150f15e402a6b /tests/dialects/test_postgres.py
parentAdding upstream version 18.13.0. (diff)
downloadsqlglot-6c774776db5e016d597e582c7006ba8d27006f9d.tar.xz
sqlglot-6c774776db5e016d597e582c7006ba8d27006f9d.zip
Adding upstream version 18.17.0.upstream/18.17.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_postgres.py')
-rw-r--r--tests/dialects/test_postgres.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dialects/test_postgres.py b/tests/dialects/test_postgres.py
index 22bede4..3121cb0 100644
--- a/tests/dialects/test_postgres.py
+++ b/tests/dialects/test_postgres.py
@@ -732,3 +732,8 @@ class TestPostgres(Validator):
self.validate_all(
"VAR_POP(x)", read={"": "VARIANCE_POP(x)"}, write={"postgres": "VAR_POP(x)"}
)
+
+ def test_regexp_binary(self):
+ """See https://github.com/tobymao/sqlglot/pull/2404 for details."""
+ self.assertIsInstance(parse_one("'thomas' ~ '.*thomas.*'", read="postgres"), exp.Binary)
+ self.assertIsInstance(parse_one("'thomas' ~* '.*thomas.*'", read="postgres"), exp.Binary)