Message 80798 - Python tracker (original) (raw)

When using sqlite3.Row as the row_factory for a sqlite3 connection and performing a SQL join that returns rows from two or more tables with identical column names, the returned sqlite3.Row object contains duplicate keys. Subsequently, when trying to access values by key, only the value contained in the lowest numbered index matching the key is returned. Additionally, attempting to use the keys returned to create a new table in the database fails due to a duplicate column name error.

A better behavior would be for the sqlite3.Row object's indices to be prefixed with table names for cases in which a query produces results from two or more tables.