Skip to content

Provide mechanism for quoted identifiers #61

@gvenzl

Description

@gvenzl

Databases have a list of reserved words that cannot be used in standard SQL as they confuse the parser with what the user actually means, e.g. an identifier or a keyword. For example, having a column name called FROM' would be confusing in the SELECT statement SELECT id, txt, tms, from FROM table` for the parser to know whether the first FROM is supposed to be interpreted as a column name or whether it's simply a syntactical error.
Hence databases, by default, don't allow the use of reserved words as arbitrary identifier names.

However, if a user nonetheless wishes to use such a reserved word, databases have a means of quoting identifiers, hence telling the parser to interpret whatever was written within the quotes literally (for most databases that also means case sensitive).
In this case, the SELECT statement would look like SELECT id, txt, tms, "from" FROM table.
Here the " quotes tell the parser to not interpret but take literally anything within the quotation marks.

As there is a legitimate use of quotation marks for identifiers, csv2db shall have a flag to quote all identifiers if the user wishes to do so.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions