Seeking rows whit \

From: Francisco Reyes <lists(at)stringsutils(dot)com>
To: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Seeking rows whit \
Date: 2008-05-19 02:26:04
Message-ID: cone.1211163964.161371.52265.1000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a way to search for rows with the character \?

I tried variants of like and ~.

create table mytable (f1 text);
insert into mytable values ('Test row 1');
insert into mytable values (E'Test row 2 \\');

select * from mytable where f1 like E'%\\%'; <-- returned nothing
select * from mytable where f1 ~ '\'; <-- waiting for single quote
select * from mytable where f1 ~ E'\\'; <-- Error

And a few more variants.. with no valid reults.

Any suggestions?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gurjeet Singh 2008-05-19 02:48:47 Re: Seeking rows whit \
Previous Message Agro-annuaire 2008-05-19 02:04:02 Agro-annuaire.com vous invite à nous rendre visite au Salon SMA-Med Food 2008 du 20 au 24 mai