Re: Can Postgres beat Oracle for regexp_count?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Can Postgres beat Oracle for regexp_count?
Date: 2022-02-02 20:43:15
Message-ID: CAKFQuwZtR5mMG5Girp1qkX0YbBaEG9pZ+oreqXgfp9y-SnRkjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 2, 2022 at 1:20 PM Shaozhong SHI <shishaozhong(at)gmail(dot)com> wrote:

> It has been found that regexp_count works brilliantly in Oracle.
>

What query exactly did you execute in Oracle that you wish to see if an
equivalent can be formulated in PostgreSQL?

>
> However, it is not easy to replicate that in Postgres.
>

Given we don't have a regexp_count function this isn't surprising...

> The following codes have been experimented but without any luck.
>
> select regexp_matches('My High Street', '([A-Z][a-z]+[\s])', 'g')
>
> select regexp_matches('My High Street', '([A-Z][a-z]+[\s]*)', 'g')
>

See my first point.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Artyom Shaposhnikov 2022-02-02 21:10:27 Re: increasing effective_cache_size slows down join queries by a factor of 4000x
Previous Message Shaozhong SHI 2022-02-02 20:20:31 Can Postgres beat Oracle for regexp_count?