[sqlalchemy] ResultProxy bug?
Ran into an issue with having periods in column headings of SQL queries. -- import sqlalchemy as sa print(sa.__version__) DB_URI = postgresql+psycopg2://test:test@localhost/testdb engine = sa.create_engine (DB_URI) qry = SELECT 1 AS test.this; results = engine.execute(qry) print(results.keys()==['this']) -- David Gardner Pipeline Tools Programmer Jim Henson Creature Shop dgard...@creatureshop.com -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] ResultProxy bug?
Sorry should have mentioned that I get this with 0.6.6 and 0.6.3 On 01/19/2011 10:27 AM, David Gardner wrote: Ran into an issue with having periods in column headings of SQL queries. -- import sqlalchemy as sa print(sa.__version__) DB_URI = postgresql+psycopg2://test:test@localhost/testdb engine = sa.create_engine (DB_URI) qry = SELECT 1 AS test.this; results = engine.execute(qry) print(results.keys()==['this']) -- David Gardner Pipeline Tools Programmer Jim Henson Creature Shop dgard...@creatureshop.com -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] ResultProxy bug?
I think you'll find 0.7 doesn't do this anymore. SQLite has a behavior such that column names get converted to tablename.colname in the case of selecting from a UNION without explicit labels so we've always had a fixer for that. In 0.7 this fixer has been removed, and the sqlite dialect specifically has a less intrusive fixer that adjusts for this particular quirk. On Jan 19, 2011, at 1:27 PM, David Gardner wrote: import sqlalchemy as sa print(sa.__version__) DB_URI = postgresql+psycopg2://test:test@localhost/testdb engine = sa.create_engine (DB_URI) qry = SELECT 1 AS test.this; results = engine.execute(qry) print(results.keys()==['this']) -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] ResultProxy bug?
Would you entertain the idea of a patch to disable this behavior when SQLite isn't being used? How soon do you want users to start testing of 0.7? On 01/19/2011 11:05 AM, Michael Bayer wrote: I think you'll find 0.7 doesn't do this anymore. SQLite has a behavior such that column names get converted to tablename.colname in the case of selecting from a UNION without explicit labels so we've always had a fixer for that. In 0.7 this fixer has been removed, and the sqlite dialect specifically has a less intrusive fixer that adjusts for this particular quirk. On Jan 19, 2011, at 1:27 PM, David Gardner wrote: import sqlalchemy as sa print(sa.__version__) DB_URI = postgresql+psycopg2://test:test@localhost/testdb engine = sa.create_engine (DB_URI) qry = SELECT 1 AS test.this; results = engine.execute(qry) print(results.keys()==['this']) -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- David Gardner Pipeline Tools Programmer Jim Henson Creature Shop dgard...@creatureshop.com -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] ResultProxy bug?
On Jan 19, 2011, at 3:30 PM, David Gardner wrote: Would you entertain the idea of a patch to disable this behavior when SQLite isn't being used? erm I'd rather not add a random flag into 0.6 which is well into maintenance mode... How soon do you want users to start testing of 0.7? I just need to fill in the major parts of http://www.sqlalchemy.org/trac/wiki/07Migration and I can start putting out betas. the code is all there. On 01/19/2011 11:05 AM, Michael Bayer wrote: I think you'll find 0.7 doesn't do this anymore. SQLite has a behavior such that column names get converted to tablename.colname in the case of selecting from a UNION without explicit labels so we've always had a fixer for that. In 0.7 this fixer has been removed, and the sqlite dialect specifically has a less intrusive fixer that adjusts for this particular quirk. On Jan 19, 2011, at 1:27 PM, David Gardner wrote: import sqlalchemy as sa print(sa.__version__) DB_URI = postgresql+psycopg2://test:test@localhost/testdb engine = sa.create_engine (DB_URI) qry = SELECT 1 AS test.this; results = engine.execute(qry) print(results.keys()==['this']) -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- David Gardner Pipeline Tools Programmer Jim Henson Creature Shop dgard...@creatureshop.com -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.