I wrote:
> Similarly, '\\%' would be the way to match a literal %. You can
> actually backslash-quote any single character this way in LIKE,
> but % and _ are the only ones where it makes a difference.
Er, check that. Backslash itself also needs quoting in LIKE.
Exercise for the student: if you need to match a literal backslash
in a LIKE pattern, how many backslashes do you have to write in your
query?
regards, tom lane
- [SQL] Search for underscore w/ LIKE brianb-pgsql
- Re: [SQL] Search for underscore w/ LIKE Tom Lane
- Re: [SQL] Search for underscore w/ LIKE Tom Lane
- Re: [SQL] Search for underscore w/ LIKE Bruce Momjian
- Re: [SQL] Search for underscore w/ LIKE Peter Eisentraut
