Re: [web2py] issue with select with yearfield.year == YEAR
Yeah right!! Thanks and sorry for the false positive... :) Richard On Fri, May 15, 2015 at 5:34 PM, Anthony wrote: > It is a method, not an attribute, so should be db.table.datefield.year(). > > Anthony > > > On Friday, May 15, 2015 at 3:16:57 PM UTC-4, Richard wrote: >> >> Hello, >> >> Not tested with recent web2py version, but in 2.9.5 this lead to a no >> where clause query : >> >> db(db.table.datefield.year == 2010).select(db.table.ALL) >> >> gives : >> >> SELECT * FROM table >> >> Instead of >> >> SELECT * FROM table WHERE EXTRACT(YEAR FROM datefield) = 2010 >> >> For instance with postgres... >> >> I have the issue with postgres and psycopg and web2py 2.9.5 >> >> I don't have time to check in recent version... So posted here before >> open a ticket to pydal if issue is still there... >> >> Richard >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] issue with select with yearfield.year == YEAR
It is a method, not an attribute, so should be db.table.datefield.year(). Anthony On Friday, May 15, 2015 at 3:16:57 PM UTC-4, Richard wrote: > > Hello, > > Not tested with recent web2py version, but in 2.9.5 this lead to a no > where clause query : > > db(db.table.datefield.year == 2010).select(db.table.ALL) > > gives : > > SELECT * FROM table > > Instead of > > SELECT * FROM table WHERE EXTRACT(YEAR FROM datefield) = 2010 > > For instance with postgres... > > I have the issue with postgres and psycopg and web2py 2.9.5 > > I don't have time to check in recent version... So posted here before open > a ticket to pydal if issue is still there... > > Richard > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] issue with select with yearfield.year == YEAR
Hello, Not tested with recent web2py version, but in 2.9.5 this lead to a no where clause query : db(db.table.datefield.year == 2010).select(db.table.ALL) gives : SELECT * FROM table Instead of SELECT * FROM table WHERE EXTRACT(YEAR FROM datefield) = 2010 For instance with postgres... I have the issue with postgres and psycopg and web2py 2.9.5 I don't have time to check in recent version... So posted here before open a ticket to pydal if issue is still there... Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.