Interesting... On Wednesday, October 21, 2015 at 5:43:22 PM UTC-4, Michael Bayer wrote: > > class Customer(Base): > __tablename__ = "customer" > id = Column(Integer, primary_key=True) > name = Column(Unicode(255)) > description = Column(Unicode(255)) >
My declarative classes use Text() for all string columns. This is because I *know* my backend is postgres and that's sort of what they recommend (the "tip": http://www.postgresql.org/docs/9.3/static/datatype-character.html). However, I neglected to consider the consequences of that decision on the ORM. It sounds like your recommendation is to disable unicode decoding at the engine level with native_unicode=False, and instead explicitly call out only those columns that contain unicode for sqlalchemy to handle the decoding of only those columns, using a mixture of (in the postgres case) Text() and UnicodeText() columns. Although, reading the docs, I got the feeling that you were discouraging people from using sqlalchemy's built-in decoding facilities in favor of the native facilities provided by the dbapi. -- 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/d/optout.