v.22.6New Feature
Support non-constant pattern argument for LIKE, ILIKE, and match functions
Support non-constant pattern argument forLIKE,ILIKEandmatchfunctions. #37251 (Robert Schulze).
Why it matters
Previously, the pattern arguments inLIKE, ILIKE, and match functions had to be constant values. This feature enables patterns to be dynamic, allowing users to perform pattern matching with variable expressions or column values, increasing flexibility and expressiveness in queries.How to use it
Simply useLIKE, ILIKE, or match functions with non-constant expressions or columns as the pattern argument in your queries, for example: SELECT * FROM table WHERE column LIKE another_column