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

v.db.update: Use case insensitive comparison for columns #1413

Merged
merged 1 commit into from Mar 1, 2021

Conversation

wenzeslaus
Copy link
Member

Returned column names are with case as present in the table, but since unqoted column names in SQL are case insensitive,
the constructed UPDATE statement works in any case.

Without this PR, the following fails for column called ABC:
...column=abc where='abc IS NULL'...
although the where part as well as rest of the UPDATE statement would work.

Returned column names are with case as present in the table, but since unqoted column names in SQL are case insensitive,
the constructed UPDATE statement works in any case.

Without this PR, the following fails for column called ABC:
...column=abc where='abc IS NULL'...
although the where part as well as rest of the UPDATE statement would work.
@wenzeslaus wenzeslaus added the bug Something isn't working label Feb 28, 2021
@wenzeslaus wenzeslaus merged commit a2686a3 into OSGeo:master Mar 1, 2021
@wenzeslaus wenzeslaus deleted the fix-v_db_update-column-case branch March 1, 2021 04:06
marisn pushed a commit to marisn/grass that referenced this pull request Mar 22, 2021
Returned column names are with case as present in the table, but since unqoted column names in SQL are case insensitive,
the constructed UPDATE statement works in any case.

Without this PR, the following fails for column called ABC:
...column=abc where='abc IS NULL'...
although the where part as well as rest of the UPDATE statement would work.
@nilason
Copy link
Contributor

nilason commented Oct 2, 2021

Shall this be backported to 7.8.6?

@landam
Copy link
Member

landam commented Oct 7, 2021

Not easy to backport (conflicts). @ninsbl What about removing backported_needed label?

@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
Returned column names are with case as present in the table, but since unqoted column names in SQL are case insensitive,
the constructed UPDATE statement works in any case.

Without this PR, the following fails for column called ABC:
...column=abc where='abc IS NULL'...
although the where part as well as rest of the UPDATE statement would work.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
Returned column names are with case as present in the table, but since unqoted column names in SQL are case insensitive,
the constructed UPDATE statement works in any case.

Without this PR, the following fails for column called ABC:
...column=abc where='abc IS NULL'...
although the where part as well as rest of the UPDATE statement would work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants