[sqlalchemy] Re: table_foo.c.column_foo.autoincrement returning True always

2006-12-23 Thread Michael Bayer
the flag only applies to primary key integer columns, otherwise is ignored. while we might want to add that logic to the Table class, it would be tricky because whether or not autoincrement is available has some dialect-specific dependencies (such as, Postgres can do BIGSERIAL on a BigInteger

[sqlalchemy] Re: table_foo.c.column_foo.autoincrement returning True always

2006-12-22 Thread Alexandre CONRAD
Sanjay wrote: In order to know whether a column is an autoincrement column, I am checking the above flag. But it is returning True always, irrespective of the column. I am using SQLAlchemy 0.3.3, PostgreSQL 8.1.4 and psycopg2 on fedora 5. Here is a similar post that was replied:

[sqlalchemy] Re: table_foo.c.column_foo.autoincrement returning True always

2006-12-22 Thread Sanjay
I am not reflecting the tables. Example code: from sqlalchemy import * metadata = BoundMetaData('postgres://user:[EMAIL PROTECTED]/mydb', echo=True) company_tbl = Table('company', metadata, Column('company_id', Integer, primary_key=True, autoincrement=True), Column('name',