pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: amutu@amutu.com
To: pgsql-bugs@postgresql.org
Subject: BUG #8335: trim() un-document behaviour
Date: Fri, 26 Jul 2013 02:23:10 +0000
Message-ID: <E1V2XgU-0003tb-Ii@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (16+ messages)  latest in thread

Message-ID: <E1V2XgU-0003tb-Ii@wrigleys.postgresql.org>
Permalink:  ../E1V2XgU-0003tb-Ii@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1V2XgU-0003tb-Ii@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: amutu@amutu.com
  Subject: Re: BUG #8335: trim() un-document behaviour
  In-Reply-To: <E1V2XgU-0003tb-Ii@wrigleys.postgresql.org>
  References: <E1V2XgU-0003tb-Ii@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox