Re: [Modeling-users] Strange date conversion in fetch qualifier
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-12-02 17:13:10
|
Hi, It was not clear to me why this was not working for you until I realized that the following statement: >>> ec.fetch('Writer', "birthday>1970-01-01 00:00:00.00") leads exactly to what you describe (libpq.OperationalError:ERROR: bad timestamp external representation '1970'). You've found a bug here, the QualifierPaser has not detected that the qualifier string you passed to it has a syntax error. Those two are correct, however, and should work as you expect: ec.fetch('Writer', 'birthday>"1970-01-01 00:00:00.00"') ec.fetch('Writer', 'birthday>"%s"' % str(DateTime(1970,01,01))) --and yes, this is a limitation of the parser, it only accepts double quo= tes around strings in qualifiers. Hopefully this solves the problem. If you still have difficulties, please tell. And thanks for reporting, I'll try to correct the bug in the parser f= or the next release. -- S=E9bastien. |