[BUGS] BUG #14478: Right Trim trims too much? - Mailing list pgsql-bugs

From nte@mustinformatique.fr
Subject [BUGS] BUG #14478: Right Trim trims too much?
Date
Msg-id 20161226093634.10135.18443@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14478: Right Trim trims too much?
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14478
Logged by:          Nathanael TERRIEN
Email address:      nte@mustinformatique.fr
PostgreSQL version: 9.6.1
Operating system:   Windows
Description:

Not sure if a bug or if I'm missing something but this query produces weird
results with TRIM and TRIM:
SELECT DISTINCT TRIM(TRAILING FROM 'cnam_lpp_histo_io','_io') AS "A"
    ,RTRIM('cnam_lpp_histo_io','_io') AS "B"
    ,REPLACE('cnam_lpp_histo_io','_io','') AS "C"
    ,REGEXP_REPLACE('cnam_lpp_histo_io','_io$','') AS "D";
Results A and B seems wrong to me (C and D are OK):
A=cnam_lpp_hist
B=cnam_lpp_hist
C=cnam_lpp_histo
D=cnam_lpp_histo


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14476: crosstabview reports mistaken location
Next
From: Terje Elde
Date:
Subject: Re: [BUGS] BUG #14478: Right Trim trims too much?