Re: regarding contains operator - Mailing list pgsql-general

From Michael Fuhr
Subject Re: regarding contains operator
Date
Msg-id 20060308104613.GA44588@winnie.fuhr.org
Whole thread Raw
In response to regarding contains operator  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
List pgsql-general
On Wed, Mar 08, 2006 at 03:13:40PM +0530, surabhi.ahuja wrote:
> please tell me is there any operator available which enables me to do the following:
>
> field contains <some value>
>
> eg field contains "abc" should return true, similary for def or tez

See "Pattern Matching" in the "Functions and Operators" chapter of
the documentation.

http://www.postgresql.org/docs/8.1/interactive/functions-matching.html

You mentioned that your data contains backslashes.  Backslashes
have special meaning to the string parser and in search patterns,
so if you need to match a literal backslash then you might need to
write more backslashes than you'd expect.  If you're using 8.0 or
later then dollar quotes can make writing patterns easier because
they don't treat backslashes as special.

http://www.postgresql.org/docs/8.1/interactive/sql-syntax.html#SQL-SYNTAX-DOLLAR-QUOTING

--
Michael Fuhr

pgsql-general by date:

Previous
From: Ragnar
Date:
Subject: Re: regarding contains operator
Next
From: "Tomi NA"
Date:
Subject: database/schema level triggers?