Author erlendaasland
Recipients berker.peksag, erlendaasland, serhiy.storchaka
Date 2021-02-20.21:54:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1613858048.02.0.874349668581.issue43251@roundup.psfhosted.org>
In-reply-to
Content
"SELECT 1" yields "1" as column name.
"SELECT <...> AS N" yields "N" as column name.
"SELECT NULL" yields "NULL" as column name.

We can't set the column name via the API, so that's pretty much it (implicit name or explicit through the AS keyword). As long as sqlite3_prepare_v2() returned SQLITE_OK, it seems that SQLite assures we've got a valid column name.

As far as I can sqlite3_column_name() returns NULL if:
1) The first parameter (stmt) is NULL
2) The second parameter is out of bounds
3) Memory error
4) No column name is set (SQLite bug)

We've got 1) and 2) covered. SQLite has a pretty good code coverage, so I'd say 4) is unlikely.

What do you think?
History
Date User Action Args
2021-02-20 21:54:08erlendaaslandsetrecipients: + erlendaasland, berker.peksag, serhiy.storchaka
2021-02-20 21:54:08erlendaaslandsetmessageid: <1613858048.02.0.874349668581.issue43251@roundup.psfhosted.org>
2021-02-20 21:54:08erlendaaslandlinkissue43251 messages
2021-02-20 21:54:07erlendaaslandcreate