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