Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlUtil does not quote column names that are reserved words #3400

Closed
davidnich opened this issue May 28, 2019 · 1 comment
Closed

SqlUtil does not quote column names that are reserved words #3400

davidnich opened this issue May 28, 2019 · 1 comment
Assignees
Milestone

Comments

@davidnich
Copy link
Contributor

leads to errors in creating or modifying tables with reserved words:

unhandled QORE System exception thrown in TID 1 at 2019-05-28 04:26:00.271117 Tue +00:00 (UTC) in Datasource::execRaw() (<builtin>:-1 (Qore builtin code))
DBI:ORACLE:OCI-ERROR: omq@oracle: QorePreparedStatement::exec(): ORA-00904: : invalid identifier
call stack:
 17: RETHROW at /opt/qorus/bin/schema-tool:529)
 16: RETHROW at /usr/share/qore-modules/0.9.3/SqlUtil.qm:7312)
 15: Datasource::execRaw() (/usr/share/qore-modules/0.9.3/Schema.qm:413 (Qore builtin code))
 14: SchemaCallbackHelper::sqlCallback() (/usr/share/qore-modules/0.9.3/SqlUtil.qm:7306 (Qore user code))
 13: AbstractDatabase::doCallback() (/usr/share/qore-modules/0.9.3/SqlUtil.qm:15043 (Qore user code))
 12: AbstractTable::getCreateTableSqlUnlocked() (/usr/share/qore-modules/0.9.3/SqlUtil.qm:15104 (Qore user code))
 11: AbstractTable::getCreateSqlUnlocked() (/usr/share/qore-modules/0.9.3/SqlUtil.qm:14099 (Qore user code))
 10: AbstractTable::getAlignSql() (/usr/share/qore-modules/0.9.3/SqlUtil.qm:7493 (Qore user code))
  9: AbstractDatabase::getAlignSql() (<builtin>:-1 (Qore user code))
  8: call_object_method_args() (/usr/share/qore-modules/0.9.3/SqlUtil.qm:6795 (Qore builtin code))
  7: Database::methodGate() (/usr/share/qore-modules/0.9.3/Schema.qm:628 (Qore user code))
  6: AbstractSchema::align() (<builtin>:-1 (Qore user code))
...
@davidnich davidnich added this to the 0.9.3 milestone May 28, 2019
@davidnich davidnich self-assigned this May 28, 2019
davidnich added a commit that referenced this issue May 29, 2019
pvanek pushed a commit that referenced this issue May 29, 2019
#3402)

* refs #3400 fixed handling of reserved words as column names in SqlUtil

* refs #3400 better / more correct column name reserved word fix - added real reserved words for pgsql
@davidnich davidnich removed the fixed label May 31, 2019
@davidnich
Copy link
Contributor Author

this bug needs to also be fixed for constraints and indexes

@davidnich davidnich reopened this May 31, 2019
davidnich added a commit that referenced this issue Jun 1, 2019
davidnich added a commit that referenced this issue Jun 1, 2019
omusil24 pushed a commit that referenced this issue Jun 1, 2019
refs #3400 fixed column name handling in indexes and constraints when…
@omusil24 omusil24 added the fixed label Jun 1, 2019
@omusil24 omusil24 closed this as completed Jun 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants