SQLite Forum

Improve sqlite3_column_name() return value documentation
Login
> implies that NULL is only returned in case of memory error, however NULL may also be returned if the statement pointer is NULL, or the column index is out of bounds.

What do you imagine the term "Memory Error" to mean other than those types of things?

Both the statement being NULL, and the column index being out-of-bounds, are very much basic cases of "Memory error".  The term "Memory Error" means that something that is requested from (or written to) memory isn't in the memory or cannot be accessed in the memory where you are pointing to.  



> I guess NULL may also be returned if the column name is not set, but that seems very unlikely.

I think if the column name is not explicitly set, SQLite always makes up one. I don't think there is a case in which NULL can be returned for a column name of a valid column in a valid statement - but I am not 100% sure about that.