Re: [sqlalchemy] BUG in union with limit in PostgreSQL

2017-05-12 Thread Jarek
Hello! Sorry, I was using old sqlalchemy, after upgrade it works fine. best regards Jarek Dnia 2017-05-12, piÄ… o godzinie 08:54 -0400, mike bayer pisze: > > On 05/12/2017 04:55 AM, Jarek wrote: > > Hello! > > > > It looks that SQLAlchemy doesn't properly handle union with limits in > >

Re: [sqlalchemy] BUG in union with limit in PostgreSQL

2017-05-12 Thread mike bayer
On 05/12/2017 04:55 AM, Jarek wrote: Hello! It looks that SQLAlchemy doesn't properly handle union with limits in the following scenario: res1 = Session.query( Messages ).order_by( Messages.ts ).limit(100) res2 = Session.query( Messages1 ).order_by( Messages1.ts ).limit(100) res3 =

[sqlalchemy] BUG in union with limit in PostgreSQL

2017-05-12 Thread Jarek
Hello! It looks that SQLAlchemy doesn't properly handle union with limits in the following scenario: res1 = Session.query( Messages ).order_by( Messages.ts ).limit(100) res2 = Session.query( Messages1 ).order_by( Messages1.ts ).limit(100) res3 = res1.union_all( res2 ) SQLAlchemy creates