Skip to content

server default comparison for blank string fails for Postgresql / Py3.7 #541

@zzzeek

Description

@zzzeek
diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py
index 73300f5..da945d8 100644
--- a/tests/test_postgresql.py
+++ b/tests/test_postgresql.py
@@ -506,6 +506,9 @@ class PostgresqlDefaultCompareTest(TestBase):
             None, col, rendered, cols[0]["default"]
         )
 
+    def test_compare_string_blank_default(self):
+        self._compare_default_roundtrip(String(8), '')
+
     def test_compare_interval_str(self):
         # this form shouldn't be used but testing here
         # for compatibility

in py37 we get:

psycopg2.ProgrammingError: unterminated quoted string at or near "'''"
LINE 1: SELECT ''::character varying = '''

in py36 no problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions