Re: [sqlite] Bug report: Wrong column name in a table in a certain case
Now fixed on trunk. On 8/11/17, Jürgen Palm wrote: > Hi, > > please have a look at the following sequence of statements executed on > Windows 10 with sqlite3.exe, version 3.19.3 and 3.20.0: > > CREATE TABLE test("column with space" TEXT); > CREATE TABLE test2 AS SELECT "column with space" FROM test; > CREATE TABLE test3 AS SELECT "column with space" FROM test GROUP BY 1; > CREATE TABLE test4 AS SELECT "column with space" AS "column with space" > FROM test GROUP BY 1; > SELECT * FROM sqlite_master; > table|test|test|2|CREATE TABLE test("column with space" TEXT) > table|test2|test2|3|CREATE TABLE test2("column with space" TEXT) > table|test3|test3|4|CREATE TABLE test3("""column with space""" TEXT) > table|test4|test4|5|CREATE TABLE test4("column with space" TEXT) > > As you can see the table "test3" has extra double quotes around the > column name "column with space". There should be no extra double quotes > for this table and table "test3" should look like the tables "test2" and > "test4". > > Regards, > Jürgen > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bug report: Wrong column name in a table in a certain case
Most probably not a bug. I asked something similar a while ago. It's as easy as https://sqlite.org/faq.html#q28 . As long as you don't explicitly assign an alias to a column name, sqlite is not guaranteed to return what you might expect. Am 11.08.2017 um 22:52 schrieb Jürgen Palm: Hi, please have a look at the following sequence of statements executed on Windows 10 with sqlite3.exe, version 3.19.3 and 3.20.0: CREATE TABLE test("column with space" TEXT); CREATE TABLE test2 AS SELECT "column with space" FROM test; CREATE TABLE test3 AS SELECT "column with space" FROM test GROUP BY 1; CREATE TABLE test4 AS SELECT "column with space" AS "column with space" FROM test GROUP BY 1; SELECT * FROM sqlite_master; table|test|test|2|CREATE TABLE test("column with space" TEXT) table|test2|test2|3|CREATE TABLE test2("column with space" TEXT) table|test3|test3|4|CREATE TABLE test3("""column with space""" TEXT) table|test4|test4|5|CREATE TABLE test4("column with space" TEXT) As you can see the table "test3" has extra double quotes around the column name "column with space". There should be no extra double quotes for this table and table "test3" should look like the tables "test2" and "test4". Regards, Jürgen ___ 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] Bug report: Wrong column name in a table in a certain case
Hi, please have a look at the following sequence of statements executed on Windows 10 with sqlite3.exe, version 3.19.3 and 3.20.0: CREATE TABLE test("column with space" TEXT); CREATE TABLE test2 AS SELECT "column with space" FROM test; CREATE TABLE test3 AS SELECT "column with space" FROM test GROUP BY 1; CREATE TABLE test4 AS SELECT "column with space" AS "column with space" FROM test GROUP BY 1; SELECT * FROM sqlite_master; table|test|test|2|CREATE TABLE test("column with space" TEXT) table|test2|test2|3|CREATE TABLE test2("column with space" TEXT) table|test3|test3|4|CREATE TABLE test3("""column with space""" TEXT) table|test4|test4|5|CREATE TABLE test4("column with space" TEXT) As you can see the table "test3" has extra double quotes around the column name "column with space". There should be no extra double quotes for this table and table "test3" should look like the tables "test2" and "test4". Regards, Jürgen ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users