- changed milestone to 0.7.0
postgres' generation of <tablename>_<colname>_seq name alters when total chars > 63
Issue #1083
resolved
the logic in postgres.py PGDefaultRunner.get_column_default()
needs to take extra PG logic for long names into account. Unfortunately this logic does not seem to be documented on the PG site, so while we can reverse engineer it, it should be considered that we might want to use an individual column reflection to get at the sequence name instead of piecing it together.
from sqlalchemy import *
engine = create_engine('postgres://scott:tiger@127.0.0.1/test', echo=True)
metadata = MetaData(engine)
aa = 'itm'*30
item_table = Table( aa[:57](:57),
metadata,
Column('id', Integer, primary_key=True),
Column('name', String(50)))
metadata.drop_all()
metadata.create_all()
item_table.insert().execute(name='foo')
Comments (3)
-
reporter -
reporter this should also be fine for 0.6
d5cc2f83c1183eb65d0daac3532a1645d0cd9513 8c2eafe54ae30649b235bc851a7a7814ed953ee5
-
reporter - removed milestone
Removing milestone: 0.6.7 (automated comment)
- Log in to comment
this is the idea, we should memoize the sequence name somewhere.