thats true the PG boolean type is not currently performing any translation on the value, meaning the 0 and 1 is what psycopg2 is giving you. however, the value should be able to go right back in if thats what its giving you, else psycopg2 is not consistent with itself.
? which version of pgsql and/or psycopg2 are both of you employing? is a pgsql 8.2-related issue? from sqlalchemy import * postgres_engine = create_engine("postgres://user:[EMAIL PROTECTED]:5432/testsa" ) metadata = BoundMetaData(postgres_engine) editore = Table("editore", metadata, Column("id", Integer, Sequence("editore_id_seq"), primary_key=True ), Column("editore", String(40), nullable=False, unique=True), Column("prova", Boolean), ) metadata.create_all() editore.insert().execute(id=3, editore="agboh", prova=True) e = editore.select(editore.c.id==2).execute().fetchone() print e.prova, type(e.prova) Result: True <type 'bool'> -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---