Re: filter records by substring match of an postgresql array column

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Arup Rakshit <aruprakshit1987(at)outlook(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: filter records by substring match of an postgresql array column
Date: 2017-11-08 11:49:51
Message-ID: CAMkU=1ztHUY9HgXwyWRk=0rtyf_HkY9sGMROO3h0T-EaSq1n_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Nov 8, 2017 02:34, "Arup Rakshit" <aruprakshit1987(at)outlook(dot)com> wrote:

Hi,

I do have a videos table, and it has a column called `tags` of type array.
I would like to select all videos where any string inside tag column
matches a given substring. What method should I use? The *Contains `@>`
operator* will do full string comparisons as far as I understood.

The extension parray_gin (
https://pgxn.org/dist/parray_gin/doc/parray_gin.html) offers the @@>
operator.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arup Rakshit 2017-11-08 12:28:56 Re: filter records by substring match of an postgresql array column
Previous Message Arup Rakshit 2017-11-08 10:32:55 filter records by substring match of an postgresql array column