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.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py
index 9651f7bd9..6dc782e8e 100644
--- a/test/dialect/postgresql/test_compiler.py
+++ b/test/dialect/postgresql/test_compiler.py
@@ -1222,6 +1222,26 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
"FOR UPDATE OF mytable_1, table2",
)
+ # ensure of=text() for of works
+ self.assert_compile(
+ table1.select(table1.c.myid == 7).with_for_update(
+ of=text("table1")
+ ),
+ "SELECT mytable.myid, mytable.name, mytable.description "
+ "FROM mytable WHERE mytable.myid = %(myid_1)s "
+ "FOR UPDATE OF table1",
+ )
+
+ # ensure literal_column of works
+ self.assert_compile(
+ table1.select(table1.c.myid == 7).with_for_update(
+ of=literal_column("table1")
+ ),
+ "SELECT mytable.myid, mytable.name, mytable.description "
+ "FROM mytable WHERE mytable.myid = %(myid_1)s "
+ "FOR UPDATE OF table1",
+ )
+
def test_for_update_with_schema(self):
m = MetaData()
table1 = Table(