Re: [sqlalchemy] Issue with relations on postgres timestamps with the value "-infinity"

2017-10-27 Thread Michel Albert
Thanks for the quick update. I did not have the reflex to look into psycopg2 for this. But indeed, a custom SA type would help here too. On Thursday, 26 October 2017 17:46:29 UTC+2, Mike Bayer wrote: > > On Thu, Oct 26, 2017 at 11:16 AM, Michel Albert > wrote: > > I've run

Re: [sqlalchemy] Issue with relations on postgres timestamps with the value "-infinity"

2017-10-26 Thread Mike Bayer
On Thu, Oct 26, 2017 at 11:16 AM, Michel Albert wrote: > I've run into an issue with tables containing the special "-infinity" value > in postgres. More precisely, when resolving relations on such tables. > > SQLAlchemy will convert the value "-infinity" into "datetime(1, 1, 1,

[sqlalchemy] Issue with relations on postgres timestamps with the value "-infinity"

2017-10-26 Thread Michel Albert
I've run into an issue with tables containing the special "-infinity" value in postgres. More precisely, when resolving relations on such tables. SQLAlchemy will convert the value "-infinity" into "datetime(1, 1, 1, 0 , 0)" and try to find rows in the related table with that value. This will