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 intervals are done by functions inside the database, so for any applications I could just use the string representations (display "2 mons" in a textbox, write the same). If I just use one of the Python drivers for PostgreSQL (psycopg2, py-postgresql), no ORM, I can write casts into the SQL as needed. But how can I do this using SQLAlchemy? I tried to declare the column in the mapped table as String, but that doesn't help, the values still are converted to 30 days for a month.

Thank you for hints,
Sibylle


--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to