Re: regexp_matches where clause - PG 9.1

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Arjen Nienhuis <a(dot)g(dot)nienhuis(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: regexp_matches where clause - PG 9.1
Date: 2017-04-07 02:49:05
Message-ID: CAJNY3iugrfZoSsa3BNd_vdZKs0Poo=gKW7PSc1iOO=LYpy6ZQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2017-04-07 14:19 GMT+12:00 David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>:

> On Thu, Apr 6, 2017 at 7:15 PM, Patrick B <patrickbakerbr(at)gmail(dot)com>
> wrote:
>
>>
>> David,
>> That won't work.
>>
>
> ​Actually, it works fine, you just keep moving the under-specified problem
> space.
> ​
> I'd suggest creating a self-contained running example that gets you close
> and show what the final output should be.
>
> David J.
>
>
http://sqlfiddle.com/#!15/6d65d

There is an example. Please note the `col2` returns not only 'main'. I need
it to return only main and I need to put it in a where clause. I can't use
~ operator because I will need to do something like:

FROM test1 t1
> JOIN another_view AS s
> WHERE s.full_path = substr(t1.full_path, char_pos '/file..' to get
> /filesuser/client/.../attachment/.../) || 'main'

Thanks
Patrick.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message rob stone 2017-04-07 03:01:14 Re: A change in the Debian install
Previous Message David G. Johnston 2017-04-07 02:19:38 Re: regexp_matches where clause - PG 9.1