On Mon, Sep 19, 2011 at 10:22 PM, Jamie Winquist <ja...@monkey.org> wrote:
> In my environment, we are connecting to the sqlite file using > pysqlite2.dbapi2. After upgrading from sqlite 3.5.4 to 3.7.7.1, iterating > over the results of a cursor.execute() are yielding different keys than they > did pre-upgrade. My query is of the form: > > SELECT table.column1, table.column2 FROM table; > > With sqlite 3.5.4, when iterating over the cursor, the keys in each result > row were named "table.column1" and "table.column2" as specified in the > query. After the upgrade to sqlite 3.7.7.1, the keys in each result row do > not include the table name in the key, but are solely the column name. Is > this expected? > If you use an AS clause to define the names of result columns, then they will always follow those names. Ex; SELECT table.column1 AS result1, table.column2 AS result2 FROM table; If you omit the AS clause, then the result column names can vary according to compile-time and run-time settings and which version of SQLite you are using. We don't deliberately change things just to frustrate you. But changes do happen. I do not recall any changes to the result column names between 3.5.4 and 3.7.8, but 3.5.4 was a really long time ago so I might easily have forgotten something. > > Thanks. > > Jamie > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users