[BUGS] BUG #14478: Right Trim trims too much?

Поиск
Список
Период
Сортировка
От nte@mustinformatique.fr
Тема [BUGS] BUG #14478: Right Trim trims too much?
Дата
Msg-id 20161226093634.10135.18443@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: [BUGS] BUG #14478: Right Trim trims too much?  (Terje Elde <terje@elde.net>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #14476: crosstabview reports mistaken location
Следующее
От: Terje Elde
Дата:
Сообщение: Re: [BUGS] BUG #14478: Right Trim trims too much?