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

Поиск
Список
Период
Сортировка
Искать
От
Nathanael Terrien
Тема
Re: [BUGS] BUG #14478: Right Trim trims too much?
Дата
Msg-id
af4cb1f0b64d4634b3b5466762fdabdd@EXCH2013.mustinformatique.fr
Ответ на
Список
Дерево обсуждения
[BUGS] BUG #14478: Right Trim trims too much? nte@mustinformatique.fr
Re: [BUGS] BUG #14478: Right Trim trims too much? Terje Elde <terje@elde.net>
Re: [BUGS] BUG #14478: Right Trim trims too much? Nathanael Terrien <nte@mustinformatique.fr>
Re: [BUGS] BUG #14478: Right Trim trims too much? Tom Lane <tgl@sss.pgh.pa.us>
Re: [BUGS] BUG #14478: Right Trim trims too much? Nathanael Terrien <nte@mustinformatique.fr>

Ok, I misunderstood the documentation. The way it works is logical.

Thank you.

 

 

De : Terje Elde [mailto:terje@elde.net]
Envoyé : lundi 26 décembre 2016 15:52
À : Nathanael Terrien <nte@mustinformatique.fr>
Cc : pgsql-bugs@postgresql.org
Objet : Re: [BUGS] BUG #14478: Right Trim trims too much?

 

 


On 26 Dec 2016, at 10:36, nte@mustinformatique.fr wrote:

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')

 

The devil is in the details. Trim won't remove the string "_io", it'll trim off the characters "_", "i" and "o". And with that logic, the "o" at the end of "histo" is correctly removed as well.

 

IOW, works as intended and advertised.

 

Doc here:

 

Terje

В списке pgsql-bugs по дате отправления
От: Terje Elde
Дата:
От: Tom Lane
Дата:
FAQ