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: unmesh.joshi126@gmail.com
Subject: BUG #17407: trim trims more than expected
Date: Wed, 16 Feb 2022 10:13:19 +0000
Message-ID: <17407-d39ff77fdea57c42@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17407
Logged by:          trim combined with substring from pattern for gives inconsistent output
Email address:      unmesh.joshi126@gmail.com
PostgreSQL version: 12.4
Operating system:   Linux 5.15.4-051504-generic
Description:        

Expected output

demo=# select trim ('nextval(''' from
substring('nextval(''database_table_id_seq''::regclass)' from
'%#"%_id_seq#"%' for '#' ));
         btrim         
-----------------------
 database_table_id_seq
(1 row)


Unexpected output

demo=# select trim ('nextval(''' from
substring('nextval(''auth_table_id_seq''::regclass)' from '%#"%_id_seq#"%'
for '#' ));
      btrim       
------------------
 uth_table_id_seq
(1 row)



view thread (3+ messages)  latest in thread

Message-ID: <17407-d39ff77fdea57c42@postgresql.org>
Permalink:  ../17407-d39ff77fdea57c42@postgresql.org/
Also on:    postgresql.org/message-id/17407-d39ff77fdea57c42@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, unmesh.joshi126@gmail.com
  Subject: Re: BUG #17407: trim trims more than expected
  In-Reply-To: <17407-d39ff77fdea57c42@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