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

Escape column names #276

Closed
wants to merge 1 commit into from
Closed

Escape column names #276

wants to merge 1 commit into from

Conversation

Svelix
Copy link

@Svelix Svelix commented Mar 29, 2019

We have a table in our project with a column named 'key'.
Since key is a reserved keyword this leads to errors when the column name is used without escaping it.
The SQL that is created by using the defncopy tool did not escape column names so it lead to errors.

This pull-request changes defncopy so column names are escaped using square brackets. My C-skills are a little rusty though, so please check if I did everything right.

@freddy77
Copy link
Contributor

freddy77 commented Apr 3, 2019

Patch make sense, some consideration:

  • would be good to also support possible ']' in names;
  • what would happen if a column name contain a comma ?
  • not all servers support [] for quoting, old ASE ones only support "";
  • (OT?) maybe for these utility some more relax "abort on memory error" should be considered.

@Michoels
Copy link

What needs to be done before this can be merged?

@freddy77
Copy link
Contributor

Superceded

@freddy77 freddy77 closed this Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants