Re: word search - Mailing list pgsql-general

From Wim Ceulemans
Subject Re: word search
Date
Msg-id 38E99CB7.C59E446C@nice.be
Whole thread Raw
In response to word search  ("Cédric Prévost" <cedric_prevost@hotmail.com>)
List pgsql-general
"Cédric Prévost" wrote:
>
> Hello,
>
> I would like to proceed to word search in a table.
> Use of "[...] attribute~*'string';" in the condition were fine. However,
> presence of operators within the string give me an error.
> For example :
> [...] attribute~*'C++';
> To unspecialise the operators could be a way of solving this.
> Do you know to do that, if it is possible ?
> Thanks for you help,
>

Make sure the result to the backend is:

[...] attribute ~* 'C\\+\\+';

(escape the special characters)

Wim

pgsql-general by date:

Previous
From: JB
Date:
Subject: Re: SELECT speed with LIKE
Next
From: Jim Richards
Date:
Subject: Re: SELECT speed with LIKE