filter records by substring match of an postgresql array column

From: Arup Rakshit <aruprakshit1987(at)outlook(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: filter records by substring match of an postgresql array column
Date: 2017-11-08 10:32:55
Message-ID: EA16EEB1-A784-4BBB-99DE-302C1708633B@outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2017-11-08 11:49:51 Re: filter records by substring match of an postgresql array column
Previous Message Arnaud L. 2017-11-08 09:19:27 DROP INDEX hangs