Re: Can Postgres beat Oracle for regexp_count?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can Postgres beat Oracle for regexp_count?
Дата
Msg-id 104523.1643840782@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Can Postgres beat Oracle for regexp_count?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Can Postgres beat Oracle for regexp_count?  (Shaozhong SHI <shishaozhong@gmail.com>)
Re: Can Postgres beat Oracle for regexp_count?  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Given we don't have a regexp_count function this isn't surprising...

FYI, it's there in HEAD.

In the meantime, you could possibly do something like

=# select count(*) from regexp_matches('My High Street', '([A-Z][a-z]+[\s])', 'g');
 count
-------
     2
(1 row)

(Note that 2 is the correct answer given that there's no space
after the third word; I trust Oracle agrees.)

            regards, tom lane



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

Предыдущее
От: Imre Samu
Дата:
Сообщение: Re: increasing effective_cache_size slows down join queries by a factor of 4000x
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: increasing effective_cache_size slows down join queries by a factor of 4000x