Open leoEspin opened 1 year ago
I am having a similar issue in Postgres with "<%". The formatter is adding a space between the two characters and is corrupting the query. See examples of use in https://www.postgresql.org/docs/current/pgtrgm.html. Otherwise this extension is great! I appreciate your hard work.
SELECT t, word_similarity('word', t) AS sml
FROM test_trgm
WHERE 'word' <% t
ORDER BY sml DESC, t;
Workaround is to disable formatting by setting "sqltools.formatLanguages": [],
Please make sure you restart VS Code after you do this.
in a query I have the formatter changes this regex
$$^[^_].+$$
to this$$ ^ [^_].+ $$
.by adding spaces the filter that uses the regex breaks damaging the results returned by the query. in my particular example the query returned empty.
to reproduce, for example in snowflake create a table with a name that starts with underscore and then create a query that searches the information schema tables view for tables that start with underscore. could use the function
rlike
and pass that pattern to accomplish this:where not rlike(...)