From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | ankurawesome37(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18438: regex isnt working for "^" , ".*" |
Date: | 2024-04-15 21:00:43 |
Message-ID: | CAKFQuwYHOkn=ZxEw0EUvUhjhHBpR91E1nm3iSsfUUHoqFA+7Uw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Apr 15, 2024 at 1:20 PM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 18438
> Logged by: Ankur Kumar
> Email address: ankurawesome37(at)gmail(dot)com
> PostgreSQL version: 14.5
> Operating system: macos ventura version 13.5
> Description:
>
> hey , i am getting empty query result while using postgres regex operator
> "^" , ".*" etc . I am able to use "%" correctly but not getting any
> response
> for other regex operator
As the opening paragraph of the relevant docs say:
There are three separate approaches to pattern matching provided by
PostgreSQL: the traditional SQL LIKE operator, the more recent SIMILAR TO
operator (added in SQL:1999), and POSIX-style regular expressions. Aside
from the basic “does this string match this pattern?” operators, functions
are available to extract or replace matching substrings and to split a
string at matching locations.
https://www.postgresql.org/docs/current/functions-matching.html
You are mixing the first and third ones together.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2024-04-15 21:10:20 | Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae |
Previous Message | Noah Misch | 2024-04-15 20:52:04 | Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae |