summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r--test/dialect/postgresql/test_compiler.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py
index b98d0fac6..98b974ea5 100644
--- a/test/dialect/postgresql/test_compiler.py
+++ b/test/dialect/postgresql/test_compiler.py
@@ -243,6 +243,18 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
"CAST(bar AS someschema.somename) AS bar",
)
+ def test_cast_double_pg_double(self):
+ """test #5465:
+
+ test sqlalchemy Double/DOUBLE to PostgreSQL DOUBLE PRECISION
+ """
+ d1 = sqltypes.Double
+
+ stmt = select(cast(column("foo"), d1))
+ self.assert_compile(
+ stmt, "SELECT CAST(foo AS DOUBLE PRECISION) AS foo"
+ )
+
def test_cast_enum_schema_translate(self):
"""test #6739"""
e1 = Enum("x", "y", "z", name="somename")