From 1a684567958d548f7ed68ba34bc17bffbadfb8ee Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 4 Apr 2008 16:06:58 +0000 Subject: fixed union() bug whereby oid_column would not be available if no oid_column in embedded selects --- test/sql/select.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/sql') diff --git a/test/sql/select.py b/test/sql/select.py index 06679e956..77926b421 100644 --- a/test/sql/select.py +++ b/test/sql/select.py @@ -888,6 +888,13 @@ SELECT thirdtable.userid FROM thirdtable)" "SELECT myothertable.otherid FROM myothertable EXCEPT SELECT thirdtable.userid FROM thirdtable \ UNION SELECT mytable.myid FROM mytable" ) + + # test unions working with non-oid selectables + s = select([column('foo'), column('bar')]) + s = union(s, s) + s = union(s, s) + self.assert_compile(s, "SELECT foo, bar UNION SELECT foo, bar UNION (SELECT foo, bar UNION SELECT foo, bar)") + @testing.uses_deprecated('//get_params') def test_binds(self): -- cgit v1.2.1