summaryrefslogtreecommitdiff
path: root/test/dialect/test_postgresql.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r--test/dialect/test_postgresql.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py
index 38a1d51a3..4a506d544 100644
--- a/test/dialect/test_postgresql.py
+++ b/test/dialect/test_postgresql.py
@@ -319,6 +319,15 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
'param_3': 3, 'param_2': 2}
)
+ def test_array_literal_insert(self):
+ m = MetaData()
+ t = Table('t', m, Column('data', postgresql.ARRAY(Integer)))
+ self.assert_compile(
+ t.insert().values(data=array([1, 2, 3])),
+ "INSERT INTO t (data) VALUES (ARRAY[%(param_1)s, "
+ "%(param_2)s, %(param_3)s])"
+ )
+
def test_update_array_element(self):
m = MetaData()
t = Table('t', m, Column('data', postgresql.ARRAY(Integer)))