From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: chetan.burande7@gmail.com
Subject: BUG #16507: RTRIM function doesnt behave as expected for certain scenario
Date: Mon, 22 Jun 2020 17:47:17 +0000
Message-ID: <16507-9f30407b2c52a573@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16507
Logged by: Chetan Burande
Email address: chetan.burande7@gmail.com
PostgreSQL version: Unsupported/Unknown
Operating system: Linux
Description:
Hi Team,
I am trying to use RTIM function on a String (Column data) to remove some
character/string from the right end.
Example -
select column_name, RTRIM(column_name, '-1') from table_name;
column_name | rtrim
-----------------------------------------+---------------------------------------
test-2020_03_01-2020_03_31-1 | test-2020_03_01-2020_03_3
test-2019_02_01-2019_02_28-1 | test-2019_02_01-2019_02_28
test-2019_04_01-2019_04_30-1 | test-2019_04_01-2019_04_30
In case of the first string, RTRIM is removing "1-1" instead of "-1".
I expect it to remove "-1" as it did in other strings.
Please let me know if you need any further information.
Thanks,
Chetan
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, chetan.burande7@gmail.com
Subject: Re: BUG #16507: RTRIM function doesnt behave as expected for certain scenario
In-Reply-To: <16507-9f30407b2c52a573@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