What is the equivalent of regexp \Q…\E in postgresql?
问题 I have the following query: SELECT field FROM myTable WHERE field ~ '\\Qprefix[\\E.+' It won't find values like prefix[foo] . How can I replace \Q..\E ? 回答1: This form of regex with a \Q..\E unquoted substring is only supported by PCRE, which is not available natively in PostgreSQL. If your program must deal with this syntax in general, the PCRE support can be installed as an extension, as provided here: https://github.com/petere/pgpcre On the other hand, if it's only that one regex that