fix: improve DatabaseMetaData.getSQLKeywords() #940
@@ Coverage Diff @@ ## master #940 +/- ## ============================================ + Coverage 67.38% 67.65% +0.26% - Complexity 3687 3762 +75 ============================================ Files 170 170 Lines 15638 15906 +268 Branches 2531 2604 +73 ============================================ + Hits 10538 10761 +223 - Misses 3917 3933 +16 - Partials 1183 1212 +29
I just stumbled upon an issue with this, which in my opinion makes this change quite breaking.
My case: Liquibase uses a column named
: PostgreSQL describes in detail how lenient it actually is with keywords in here, and we actually have access to that through the
If we're gonna update the keyword list to a modern one, which is awesome, we should at least only return the ones that are actually
Of course some of the above is my opinion, so please let me know if I got anything wrong. Otherwise, we should improve [this implementation].
@fredgalvao , what version of Liquibase are you using?
While it may make sense to filter by
and some SQL:2003 keywords are "reserved keywords", so in this context
Researching on the subject, I first asked you about the version of Liquibase because since 2013, Liquibase don't use
Check the item CORE-1530
They are now using a static list of keywords:
If Liquibase is generating dynamic sql and adding quoting based on this, my best recommendation is that they should use quote_ident(string text).
@jorsol That cleared a bunch of things for me, thanks for the additional research!
I'd still say that the wording and meaning behind terms such as
So, unfortunately I'm stuck for a while on
I'll document my dependency with this issue and update when liquibase can be chain-updated.