pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: ankurawesome37@gmail.com
Subject: BUG #18438: regex isnt working for "^" , ".*"
Date: Mon, 15 Apr 2024 19:49:42 +0000
Message-ID: <18438-d42a9e2d7ba6407f@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18438
Logged by:          Ankur Kumar
Email address:      ankurawesome37@gmail.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 . For example - There is a user in users table
with  >  first_name - "aman", last_name -  "kumar" .
But while quering  i am not getting any result while querying users table
->

1) SELECT id from users where concat(users.first_name, ' ', users.last_name)
ILIKE '^am' 
2) SELECT id from users where concat(users.first_name, ' ', users.last_name)
ILIKE 'am.*' 
3) SELECT id from users where concat(users.first_name, ' ', users.last_name)
ILIKE '^am%' 

Above queries didnt return any result 

But it works for this query -

SELECT id from users where concat(users.first_name, ' ', users.last_name)
ILIKE 'am%' LIMIT 100



view thread (2+ messages)  latest in thread

Message-ID: <18438-d42a9e2d7ba6407f@postgresql.org>
Permalink:  ../18438-d42a9e2d7ba6407f@postgresql.org/
Also on:    postgresql.org/message-id/18438-d42a9e2d7ba6407f@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, ankurawesome37@gmail.com
  Subject: Re: BUG #18438: regex isnt working for "^" , ".*"
  In-Reply-To: <18438-d42a9e2d7ba6407f@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox