BUG #8335: trim() un-document behaviour

Поиск
Список
Период
Сортировка
От amutu@amutu.com
Тема BUG #8335: trim() un-document behaviour
Дата
Msg-id E1V2XgU-0003tb-Ii@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #8335: trim() un-document behaviour  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8335
Logged by:          Jov
Email address:      amutu@amutu.com
PostgreSQL version: 9.2.4
Operating system:   suse 10 linux 64
Description:

in the postgresql doc 9.4,I find the trim() function like this:


trim([leading | trailing | both] [characters] from string)


so the trim should be pass only one argument with some optional prefix。but I
find the following calls with two argument is successfull but the results is
unexpected and wired:


##first call
postgres=# select trim(trailing ‘/’, ‘fasd/’);
rtrim
——-


(1 row)
-----!!!note: it return titile is rtrim----


## second call
postgres=# select trim(‘/’, ‘fasd/’)
;
btrim
——-


(1 row)
-----!!!note: it return titile is btrim----


it seems trim is transform to r、b、l trim internal,but the above call should
return error or it may produce un-expect results

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Petr Chmelar
Дата:
Сообщение: Re: BUG #8329: UPDATE x SET x.y = x.y + z does not work in PL/pgSQL
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: BUG #8326: pgbench tps wrong BUG