Allow identifier quoting for Database plugins
Description
Release Notes
None
is duplicated by
relates to
Activity
Show:
Unresolved
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Avinash Achar
Avinash AcharReporter
Vitalii Tymchyshyn
Vitalii TymchyshynPriority
More fields
Original estimate
More fields
Original estimateCreated December 14, 2021 at 1:26 AM
Updated January 4, 2022 at 6:54 PM
Currently when a field has a name that is a SQL reserved word, we fail to write to it with Database plugins.
This can be improved by using quoting identifiers. But this should be done with care as quoting identifiers makes them case-sensititive.
Usually different databases lowercase or uppercase unquoted identifiers to make them case-insensitive.
So quoting Aaa identifier as "Aaa" would actually change the field name and potentially break an existing pipeline.
This can be handled is a different ways:
By fixing on per-DBMS case, e.g. we know that PostgreSQL lowercases the identifiers, so we can transform Aaa into "aaa" to name same field.
By using Database or ResultSet meta-data, see https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#storesLowerCaseIdentifiers. This may lead to problems if JDBC driver does not set it properly
By requiring a special setting to enabled quoted identifiers.