Hello,
I have an application that is throwing exceptions on insert because one of
the columns was defined too short.
sqlalchemy.exc.DataError: (psycopg2.DataError) value too long for type
character varying(50)
The model is defined as:
class Device(Base):
processor = Column(String(50))
...
Temporarily, I was thinking on increasing the length by running the
statement:
ALTER TABLE devices ALTER COLUMN processor TYPE character varying(128);
Are there any foreseeable issues with the column definition and the actual
database having different length fields?
The application consists of:
- Pyramid 1.5.
- Postgres 9.3.4.
- SQLAlchemy 1.0.6
- Python 3.4.3
Any thoughts or help would be much appreciated.
Kind Regards,
David Anderson
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.