Wei Weng <[EMAIL PROTECTED]> writes:
> What about in regular strings? I do need to use backslash to escape the
> other backslash in order to get the '\'. Why isn't that the case in LIKE
> operation?
It is. You write four backslashes in order to describe a string
constant value containing two ba
Tom Lane wrote:
Wei Weng <[EMAIL PROTECTED]> writes:
But if I choose to use string comparison, instead of 4 escape characters, I
only need 2.
Why is that?
Backslash is an escape character for LIKE.
regards, tom lane
What about in regular strings? I do need to use backsla
Wei Weng <[EMAIL PROTECTED]> writes:
> But if I choose to use string comparison, instead of 4 escape characters, I
> only need 2.
> Why is that?
Backslash is an escape character for LIKE.
regards, tom lane
---(end of broadcast)---
I used the following SQL code to match '\foo\bar'
SELECT text FROM test WHERE text LIKE 'foo%'
But if I choose to use string comparison, instead of 4 escape characters, I
only need 2.
SELECT text FROM test WHERE text = '\\foo\\bar'
Why is that?
I am using PostgreSQL 7.4, and the SQL code