Here's the dump I get:

c:\temp>sql xxx.db .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE xxx(`a b c`);
INSERT INTO xxx(a b c) VALUES(1);
COMMIT;

Do you see the problem?
INSERT specifies column name without quotes.

However, I also tried with latest trunk, and I get a different dump:

PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE xxx(`a b c`);
INSERT INTO xxx VALUES(1);
COMMIT;

The column name is missing.  Hmm!
This is on Win7 machine if it matters.

-----Original Message----- From: Keith Medcalf
Sent: Saturday, April 08, 2017 2:08 AM
To: 'SQLite mailing list'
Subject: Re: [sqlite] Another .DUMP issue with v 3.18.0


Try using different quotes, not ones that have meaning to the shell.


--
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

-----Original Message-----
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
On Behalf Of Tony Papadimitriou
Sent: Friday, 7 April, 2017 17:04
To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Subject: Re: [sqlite] Another .DUMP issue with v 3.18.0

-----Original Message-----
From: Josh Hunsaker

>On Fri, Apr 7, 2017 at 3:02 PM, Richard Hipp wrote:
>> On 4/7/17, Tony Papadimitriou wrote:
>>>
>>> sql xxx.db "CREATE TABLE xxx(`time zone`)" "insert into xxx
values('1')"
>>> sql .dump xxx.db | sql
>>>
>>
>> I'm unable to repro.
>>

>Is this possibly because the shell that Tony is using is evaluating `time
>zone`?

>I can repro, but in my case, the obvious cause is that the `time zone`
>portion gets evaluated to an empty string.

Well, try this instead:
sql xxx.db "CREATE TABLE xxx(`a b c`)" "insert into xxx values(1)"

The problem is the column has spaces and it's not quoted.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to