PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16507
PG VersionUnsupported/Unknown
Opened2020-06-22 17:47:17+00
Reported byChetan Burande

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16507
Logged by:          Chetan Burande
Email address:      (redacted)
PostgreSQL version: Unsupported/Unknown
Operating system:   Linux

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.



2020-06-22 17:47:17+00PG Bug reporting formBUG #16507: RTRIM function doesnt behave as expected for certain scenario
2020-06-22 18:18:49+00Tom LaneRe: BUG #16507: RTRIM function doesnt behave as expected for certain scenario