Re: [web2py] Re: postgress outer join

2011-05-01 Thread Pawel Jasinski
hi Massimo, how about the following: the _select/select would accept extra parameter 'inner_join' with syntax/semantic analog to 'left', but emit JOIN at the sql level. In case of such a unpleasant query as mine, it would be possible to construct it with inner_join instead of the usual way. My o

Re: [web2py] Re: postgress outer join

2011-04-29 Thread Pawel Jasinski
hi, somehow I am getting way to many records as a result. --pawel On Fri, Apr 29, 2011 at 3:53 PM, Massimo Di Pierro wrote: > Can you please try: > > db(db.first.id.belongs(db()._select(db.second.r12_first_id))) > .select(db.first.ALL,db.second.ALL,db.third.ALL,db.fourth.ALL, > left= [ > db.s

[web2py] Re: postgress outer join

2011-04-29 Thread Massimo Di Pierro
Can you please try: db(db.first.id.belongs(db()._select(db.second.r12_first_id))) .select(db.first.ALL,db.second.ALL,db.third.ALL,db.fourth.ALL, left= [ db.second.on(db.first.id==db.second.r12_first_id), db.third.on(db.third.r13_first_id==db.first.id), db.fourth.on(db.fourth.r14_second_id==db.seco

[web2py] Re: postgress outer join

2011-04-29 Thread Pawel Jasinski
hi, short update > I could use executesql, but is there an easy way to reconnect the > result of executesql into the rows returned by db(...).select(...)? As a work around I do the following: 0. modify DAL so select( ) accepts extra parameter to overwrite generated sql 1. develop and test with s