Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2Xgi-0005JA-73 for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jul 2013 02:23:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V2Xgh-0005YT-Mu for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jul 2013 02:23:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2Xgh-0005YN-3z for pgsql-bugs@postgresql.org; Fri, 26 Jul 2013 02:23:23 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2Xgb-0000n9-8Y for pgsql-bugs@postgresql.org; Fri, 26 Jul 2013 02:23:22 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2XgZ-0005Et-Rn for pgsql-bugs@postgresql.org; Fri, 26 Jul 2013 02:23:16 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1V2XgU-0003tb-Ii for pgsql-bugs@postgresql.org; Fri, 26 Jul 2013 02:23:10 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: BUG #8335: trim() un-document behaviour To: pgsql-bugs@postgresql.org From: amutu@amutu.com Message-Id: Date: Fri, 26 Jul 2013 02:23:10 +0000 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs