Re: regarding contains operator - Mailing list pgsql-general

From Tom Lane
Subject Re: regarding contains operator
Date
Msg-id 14602.1141832096@sss.pgh.pa.us
Whole thread Raw
In response to regarding contains operator  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
List pgsql-general
"surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in> writes:
>  i have a field whose type is varchar(16)
> and the field is multivalued, in the sense it is of the form

> abc\def\tez
> (i.e. backslash separed values)

To be blunt, this is a really poorly-chosen data representation.
To point out just one problem, backslashes in the values will cause
you headaches.

Perhaps an array field would serve you better.  Then the specific
operation you are considering would be "foo = ANY(arrayfield)".

            regards, tom lane

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: database/schema level triggers?
Next
From: "Rodrigo Sakai"
Date:
Subject: Re: Temporal Databases