Discussion:
[sqlite] Documentation bug: remove gmane address on Bug Report page
積丹尼 Dan Jacobson
2017-07-01 22:51:57 UTC
Permalink
Please fix
https://www.sqlite.org/src/wiki?name=Bug+Reports .
It says to see
http://news.gmane.org/gmane.comp.db.sqlite.general
but that page is no longer working.
Maybe tell them to see
http://sqlite.1065341.n5.nabble.com/
(But I don't know if that is the canonical URL.)
積丹尼 Dan Jacobson
2017-07-01 22:55:45 UTC
Permalink
By the way, you might want to unlock
http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/
as one can read it on Nabble anyway.
Then you could just tell users to see the Archives.
積丹尼 Dan Jacobson
2017-07-01 23:04:22 UTC
Permalink
sqlite3-doc/cli.html#csv_import should warn
that there is no way to preserve NULL with CSV.

You can even add a proof if you want,

$ sqlite3 mydata.db<<EOF
CREATE TABLE memos(a);
INSERT INTO memos VALUES(NULL);
.mode csv
.once mmm.csv
SELECT * FROM memos;
.import mmm.csv memos
.dump
EOF

PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE memos(a);
INSERT INTO memos VALUES(NULL);
INSERT INTO memos VALUES('');
COMMIT;

(Thus no way to do "If no ROWID is specified on the insert, or if the
specified ROWID has a value of NULL, then an appropriate ROWID is
created automatically" mentioned in
file:///usr/share/doc/sqlite3-doc/autoinc.html )
https://www.google.com/search?q=CSV+NULL+SQLite
Simon Slavin
2017-07-01 23:14:08 UTC
Permalink
So near the top of the article add this synopsis of the three basic forms,
INSERT INTO moz_cookies VALUES(1,'Bart',12);
INSERT INTO moz_cookies SELECT ..... ????
INSERT INTO moz_cookies DEFAUT_VALUES ???
If those are "the" three forms, there are actually four and there needs to be one for

INSERT INTO moz_cookies (id_number, name, age) VALUES(1,'Bart',12);

or whatever the columns are actually called.

Simon.
積丹尼 Dan Jacobson
2017-07-01 23:18:48 UTC
Permalink
Sorry I glued these all into the same thread. I'll be more careful next time.
Keith Medcalf
2017-07-01 23:32:05 UTC
Permalink
Actually there would be six since you can either specify or omit the columns list for each ...
--
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
-----Original Message-----
On Behalf Of Simon Slavin
Sent: Saturday, 1 July, 2017 17:14
To: SQLite mailing list
Subject: Re: [sqlite] Documentation bug: lang_insert.html needs examples
So near the top of the article add this synopsis of the three basic
forms,
INSERT INTO moz_cookies VALUES(1,'Bart',12);
INSERT INTO moz_cookies SELECT ..... ????
INSERT INTO moz_cookies DEFAUT_VALUES ???
If those are "the" three forms, there are actually four and there needs to
be one for
INSERT INTO moz_cookies (id_number, name, age) VALUES(1,'Bart',12);
or whatever the columns are actually called.
Simon.
_______________________________________________
sqlite-users mailing list
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...