You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
When using the REPLACE function in PostgreSQL with a backslash ('\') as the search string, the SQL parser fails to correctly identify the backslash as a valid token. Instead, it treats the backslash and subsequent characters as part of the same token. This issue arises due to the STRING_ matching rules in the Lexer, which are unable to handle the backslash properly.
Steps to Reproduce:
Run the following SQL query in PostgreSQL:
SELECT id, REPLACE(content, '\', 'a') AS replaced_content FROM test_table WHERE content = 'Y';