Re: [sqlite] sqlite3_db_filename returns an empty string when null pointer is promised

2019-03-18 Thread Joshua Thomas Wise
I recently ran into this as well. NULL is not the same as “”, and it took me a really long time of debugging before I realized it was the sqlite3 documentation at fault. > On Mar 13, 2019, at 6:03 PM, Alex Alabuzhev wrote: > > Hi, > > https://www.sqlite.org/c3ref/db_filename.html: > >> If

[sqlite] sqlite3_db_filename returns an empty string when null pointer is promised

2019-03-13 Thread Alex Alabuzhev
Hi, https://www.sqlite.org/c3ref/db_filename.html: > If there is no attached database N on the database connection D, or if database N is a temporary or in-memory database, then a NULL pointer is returned. However, when called for :memory: db the function actually returns "". Looking at the