regexp_matches where clause - PG 9.1

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: regexp_matches where clause - PG 9.1
Date: 2017-04-06 03:54:50
Message-ID: CAJNY3ivvaFh4Rkg5zn--Nc7_3w4sKRj4AoPijP-4-bOoE1yqKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys,

i've got this column:

path_name character varying(255)
>

I store full S3 bucket path for the attachments of my application on it;
example:

/{s3bucket}/filesuser/client/27801123/attachment/4510/main
>
/{s3bucket}/filesuser/client/27801123/attachment/4510/file
>

I wanna do a select, where path_name has only 'main' and not anything else.

Maybe using regexp_matches but then how to put it into a where clause?

Thanks!
Patrick.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-04-06 04:05:51 Re: A change in the Debian install
Previous Message Tom Lane 2017-04-06 03:31:40 Re: Unexpected interval comparison