Re: [GENERAL] regexp_matches where clause - PG 9.1

Поиск
Список
Период
Сортировка
От Arjen Nienhuis
Тема Re: [GENERAL] regexp_matches where clause - PG 9.1
Дата
Msg-id CAG6W84+xBbLBk1K1mw-utn63Rct_enBr=Uf-90RSgerU4+Tq0w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] regexp_matches where clause - PG 9.1  (Patrick B <patrickbakerbr@gmail.com>)
Список pgsql-general


On Apr 7, 2017 4:16 AM, "Patrick B" <patrickbakerbr@gmail.com> wrote:


2017-04-07 14:08 GMT+12:00 David G. Johnston <david.g.johnston@gmail.com>:
On Thu, Apr 6, 2017 at 6:33 PM, Patrick B <patrickbakerbr@gmail.com> wrote:
When actually I just want the 'main''

​SELECT * FROM tbl WHERE path_name ~ '/main$' ?

David J.


David,
That won't work.

When performing the select, I got:

/{s3bucket}/filesuser/client/27801123/attachment/4510/file/1113/small/main

when actually i want:

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


Patrick.

WHERE (path_name)::text ~ '^/filesuser/client/\d+/attachment/\d+/main$'



В списке pgsql-general по дате отправления:

Предыдущее
От: Arjen Nienhuis
Дата:
Сообщение: Re: [GENERAL] regexp_matches where clause - PG 9.1
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] regexp_matches where clause - PG 9.1