Bug 332160 - Cannot create table with reserved word as column name
Summary: Cannot create table with reserved word as column name
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: Tables (show other bugs)
Version: 2.8.0
Platform: unspecified All
: NOR normal
Target Milestone: 2.8.2
Assignee: Wojciech Kosowicz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 22:44 UTC by Jarosław Staniek
Modified: 2014-05-17 20:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Staniek 2014-03-14 22:44:11 UTC
It's not possible to create table with reserved word as column name.



Reproducible: Always

Steps to Reproduce:
1. Start the Table Designer
2. Enter 'group' as column name
3. Click Save
Actual Results:  
Error such as:
----
Saving “table1” object failed.
Saving object's definition failed.
Transaction not started.
Message from server: near "group": syntax error
Server result: 1 (SQLITE_ERROR)
----


Expected Results:  
Table is created properly and is accessible.

Enclosing reserved words with " " would help.
Comment 1 Wojciech Kosowicz 2014-05-01 23:46:28 UTC
Git commit de07f92717012158b83ca0343e163d32dd9ba11f by Wojciech Kosowicz.
Committed on 01/05/2014 at 22:33.
Pushed by wkosowicz into branch 'master'.

Added toUpper for a word to be checked if is KexiSql keyword
REVIEW: 117803

M  +1    -1    libs/db/driver.cpp

http://commits.kde.org/calligra/de07f92717012158b83ca0343e163d32dd9ba11f
Comment 2 Wojciech Kosowicz 2014-05-09 18:32:04 UTC
Git commit a45456b236e1874d87f335ec9f61e1a190987432 by Wojciech Kosowicz.
Committed on 02/05/2014 at 18:49.
Pushed by wkosowicz into branch 'master'.

Updated list of kexiSql keywords (kexi)

M  +87   -84   libs/db/keywords.cpp

http://commits.kde.org/calligra/a45456b236e1874d87f335ec9f61e1a190987432
Comment 3 Wojciech Kosowicz 2014-05-09 18:32:04 UTC
Git commit 5a5dba8894280aa73c3610a96ca65cde5534f320 by Wojciech Kosowicz.
Committed on 09/05/2014 at 18:27.
Pushed by wkosowicz into branch 'master'.

Updated list of postgresql keywords from postgresql-9.3.4 (generated)

M  +340  -237  kexi/kexidb/drivers/pqxx/pqxxkeywords.cpp

http://commits.kde.org/calligra/5a5dba8894280aa73c3610a96ca65cde5534f320
Comment 4 Wojciech Kosowicz 2014-05-09 18:32:04 UTC
Git commit e8076d4ac422207ae0013a40a9f98b95ab10e140 by Wojciech Kosowicz.
Committed on 02/05/2014 at 18:45.
Pushed by wkosowicz into branch 'master'.

Updated list of sqlite keywords from sqlite3080403 (kexi)

M  +56   -32   libs/db/drivers/sqlite/sqlitekeywords.cpp

http://commits.kde.org/calligra/e8076d4ac422207ae0013a40a9f98b95ab10e140
Comment 5 Jarosław Staniek 2014-05-09 22:08:24 UTC
Git commit 28ec311b2f9b4df06959c03399800a2cd3839df1 by Jaroslaw Staniek, on behalf of Wojciech Kosowicz.
Committed on 01/05/2014 at 22:33.
Pushed by staniek into branch 'calligra/2.8'.

Added toUpper for a word to be checked if is KexiSql keyword
REVIEW: 117803

M  +1    -1    libs/db/driver.cpp

http://commits.kde.org/calligra/28ec311b2f9b4df06959c03399800a2cd3839df1
Comment 6 Wojciech Kosowicz 2014-05-17 20:40:50 UTC
Git commit ec6b3d30637f738437be5cc4f91300b2e1d70a3f by Wojciech Kosowicz.
Committed on 17/05/2014 at 20:28.
Pushed by wkosowicz into branch 'master'.

Updated script for generating databases keywords in Kexi
REVIEW: 117966

M  +137  -107  kexi/tools/sql_keywords/sql_keywords.sh

http://commits.kde.org/calligra/ec6b3d30637f738437be5cc4f91300b2e1d70a3f
Comment 7 Wojciech Kosowicz 2014-05-17 20:42:40 UTC
Git commit 7cad6535f4dcdde5f29ae1b585e5efccdfa46479 by Wojciech Kosowicz.
Committed on 17/05/2014 at 20:28.
Pushed by wkosowicz into branch 'calligra/2.8'.

Updated script for generating databases keywords in Kexi
REVIEW: 117966

M  +137  -107  kexi/tools/sql_keywords/sql_keywords.sh

http://commits.kde.org/calligra/7cad6535f4dcdde5f29ae1b585e5efccdfa46479