Re: [GENERAL] Quoting/Escaping - Mailing list pgsql-general

From Ed Loehr
Subject Re: [GENERAL] Quoting/Escaping
Date
Msg-id 3842037C.533C41CA@austin.rr.com
Whole thread Raw
In response to Quoting/Escaping  (Bill Sneed <bsneed@mint.net>)
List pgsql-general
Bill Sneed wrote:

> I'd like to be able to find a book title that contain C++ in the
> title....
>
> select * from books where title ~* 'C++'   doesn't work.
>
> I've tried all the basic methods of quoting the Plus (+) signs but
> none seem to work...
>
> Any hints would be most appreciated....
>
> ....Thanks...
>
> ....Bill Sneed, Prospect, Maine....
>
> ************

I think the 'like' operator may do what you seek.

create table t (w varchar);
insert into t (w) values ('C++');
insert into t (w) values ('C');
select * from t where w like 'C++';
w
---
C++
(1 row)

Cheers.
Ed


pgsql-general by date:

Previous
From: "Darvin Zuch"
Date:
Subject: RE: [GENERAL] Mail to DB.
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions