From: Michel B. <mi...@bo...> - 2005-02-19 21:32:04
|
Le Samedi 19 F=E9vrier 2005 11:43, Michel Bouissou a =E9crit : > > > It seems that what prevents the index from being used, is having the > > "now() - INTERVAL '65 DAY'" calculation performed as an expression in= the > > WHERE clause comparison. [...] > > Probably, having this routine calculate the date boundary by itself, = and > > spit a result [...] > > I've written a patch (attached) that I'm currently testing. It seems to > work OK in PostgreSQL so far. The attached patch supersedes and replaces the one I sent in my previous=20 email. It does basically the same thing, but it does it better ;-) : It specifie= s the=20 date (for PostgreSQL) in a format that is locale and "DateStyle" independ= ent,=20 and thus shouldn't be disturbed by such local settings. It also specifies the date in a format that should be OK for MySQL (teste= rs=20 needed ;-) For SQlite, I'm not sure, and some input is needed. --=20 Michel Bouissou <mi...@bo...> OpenPGP ID 0xDDE8AC6E |