[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-06 Thread Robert Pollak
Robert Pollak added the comment: Here is now a reduced version of my real use case: 2017v2-reduced.db. The file was originally created with "Oracle DBConvert". This file contains a table without rows. I was wrong in my last comment: There's also no sniffing needed here, see either of the

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-05 Thread Robert Pollak
Robert Pollak added the comment: Paul, the sniffing would be only active for people who explicitly add a connect() argument like detect_types=DETECT_DATETIME, which can have the appropriate warning in the docs. You can also extend the sniffing to all values, not just the first non-missing

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-05 Thread Paul Ganssle
Paul Ganssle added the comment: With regards to automatically deducing column types, I am -1 on that. It has way too many dangerous edge cases, and I know of countless bugs in software that are the direct result of stringly-typed data being coerced into a specific data type based on its

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-05 Thread Robert Pollak
Robert Pollak added the comment: I have created the attached sqlite database file (with SQLiteStudio) for testing. I contains a table `t` with a TEXT column `x` and a DATETIME (according to SQLiteStudio) column `y`. The table contains a single row with the value `2018-11-05 12:20:30` for

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-04 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: ok in this case, I re-open the issue. -- resolution: fixed -> status: closed -> open ___ Python tracker ___

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-04 Thread Robert Pollak
Robert Pollak added the comment: Stéphane, your example does not match my use case with unknown table structure. Does everyone agree that such a sniffing is out of scope for sqlite3? That's not what I'd call "batteries included" :-( -- title: sqlite3: "select *" should optionally