Repository navigation
Conversation
jmarton
force-pushed
the
postgres-quote-reserverd-words
branch
from
January 22, 2018 23:25
34945c2 to
85f270d
Compare
Author
|
@mickhansen may I ask you for some advice on how to move forward with this? For the missing checks:
|
Author
|
@sushantdhiman may I ask you for some advice on how to move forward with this? |
Contributor
|
Seems like a good idea and actually this will allow users to use sequelize properly when identifiers are not quoted. But this needs some work, I will tackle that in my attempt to refactor query generator https://github.com/sequelize/sequelize/blob/refactor/lib/dialects/abstract/query-generator/helpers/quote.js#L46 |
4 of 5 tasks
Contributor
|
This fix was included to v5 #9236, will be released in next beta release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description of change
Having reserved words generated in the PostgreSQL queries came up a few times, e.g. in #3528, and in these situations, it was the only possible solution to re-enable quoting.
After this change, reserved words are always quoted, even if
quoteIdentifiersis set tofalse.This makes it possible to have case-insensitive identifiers in PostgreSQL when certain queries had table aliases generated, which turn out to be PostgreSQL reserved words.
e.g. for the model
Users, sometimes,Useris the generated table alias, which must be quoted to avoid naming problems.