Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-25 Thread Wichert Akkerman
On 25 Dec 2013, at 00:27, David Bolen db3l@gmail.com wrote: Sibylle Koczian nulla.epist...@web.de writes: Exactly, that's it. The stackoverflow discussion was very instructive, thank you! I'll try out psycopg2-dateutils. I'm a big fan of dateutil. If you do use it, you may also

Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-25 Thread Wichert Akkerman
On 24 Dec 2013, at 08:11, Laurence Rowe laurencer...@gmail.com wrote: Postgres' INTERVAL supports deltas of quantities other than days, +1 month may mean 28/29/30/31 days depending on the month. From

Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-23 Thread Michael Bayer
On Dec 23, 2013, at 9:29 AM, Sibylle Koczian nulla.epist...@web.de wrote: Am 21.12.2013 16:27, schrieb Michael Bayer: In the case of using Postgresql, the type sqlalchemy.dialects.postgresql.INTERVAL takes over wherever you might have used a sqlalchemy.Interval type.In this case,

Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-23 Thread Laurence Rowe
On Monday, 23 December 2013 06:38:41 UTC-8, Michael Bayer wrote: On Dec 23, 2013, at 9:29 AM, Sibylle Koczian nulla.e...@web.dejavascript: wrote: Am 21.12.2013 16:27, schrieb Michael Bayer: In the case of using Postgresql, the type sqlalchemy.dialects.postgresql.INTERVAL takes

[sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-21 Thread Sibylle Koczian
Hello, I'm using the interval data type in two PostgreSQL databases with intervals ranging from some days to several years. No problems with intervals measured in days, but with all the interval values which can't be correctly converted to datetime.timedelta. All the calculations involving

Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-21 Thread Michael Bayer
On Dec 21, 2013, at 7:05 AM, Sibylle Koczian nulla.epist...@web.de wrote: Hello, I'm using the interval data type in two PostgreSQL databases with intervals ranging from some days to several years. No problems with intervals measured in days, but with all the interval values which can't