Helge Kreutzmann wrote:
> Well, the "\" is part of the strings to be outputed, so I did not
> intend to quota anything. If I replace \ to \\ in my first query, I
> get also no result.
>
I think you need 4 '\'s:
test=# create table written_by(title text);
CREATE
test=# insert into written_by values('An equation of state {\\em \\\`a
la} Carnahan-Starling');
INSERT 16661 1
test=# select * from written_by; title
----------------------------------------------------- An equation of state {\em \`a la} Carnahan-Starling
(1 row)
test=# SELECT title from written_by where title like 'An equation of
state {\\\\e%'; title
----------------------------------------------------- An equation of state {\em \`a la} Carnahan-Starling
(1 row)
This is because the string literal parser reduces '\\\\' to '\\', and
then the backend function which implements LIKE interprets '\\' as '\'.
HTH,
Joe