BUG #17407: trim trims more than expected

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: unmesh(dot)joshi126(at)gmail(dot)com
Subject: BUG #17407: trim trims more than expected
Date: 2022-02-16 10:13:19
Message-ID: 17407-d39ff77fdea57c42@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(dot)joshi126(at)gmail(dot)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)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-02-16 10:36:31 BUG #17408: Duplicate aliases silently fail
Previous Message Victor Yegorov 2022-02-16 08:14:49 Re: BUG #17406: Segmentation fault on GiST index after 14.2 upgrade