Re: regarding contains operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: regarding contains operator
Date: 2006-03-08 15:34:56
Message-ID: 14602.1141832096@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"surabhi.ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rodrigo Sakai 2006-03-08 15:38:01 Re: Temporal Databases
Previous Message Nik 2006-03-08 15:31:19 Out of memory error on pg_restore