simple insert issue with 3.35.5 - .sqliterc issue?
I ran into a problem with a work computer. After much head scratching, etc, I tried my home computer. After more head scratching, I finally reduced this to a simple test case.
For sqlite-3.35.5 compiled with gcc or with clang on a linux machine - that's the work setup - or for version 3.32 on my MacOS machine, if I do this:
$ cat ~/.sqliterc .headers on
$ sqlite3 sqlite> create table foo(a text, b text unique); sqlite> insert into foo values ("a", null), ("a2", "b1"), ("a3", "b2"), ("a4", null); sqlite> select * from foo; a|b a| a2|b1 a3|b2 a4|
When I remove ~/.sqliterc, I get different results:
$ rm ~/.sqliterc
$ sqlite3 sqlite> create table foo(a text, b text unique); sqlite> insert into foo values ("a", null), ("a2", "b1"), ("a3", "b2"), ("a4", null); sqlite> select * from foo; a| a2|b1 a3|b2 a4|
Any thoughts or suggestions? Perhaps something has changed with respect to the processing of the .sqliterc file?
The results are the same. The former mere has a ".header on" row containing the column headings, and the one where no ".headers on" command is processed does not. The data is the same.
Thanks for the explanation. It makes perfect sense ... and I should have been able to figure out my own mistake. Too many distractions.
... though, now that I think about it, it would have helped if the column headings were underlined. Is there any way to make those appear? ie,
select * from foo; a|b --- <--- ASCII / poor man's column header underlines :-) a| a2|b1 ...
Either way, thanks for the quick response.