Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WNj0u-0008Bg-E5 for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Mar 2014 13:16:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WNj0s-00084X-Sg for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Mar 2014 13:16:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WNfc3-0007nG-Ti for pgsql-bugs@postgresql.org; Wed, 12 Mar 2014 09:38:11 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WNfbx-0004wu-54 for pgsql-bugs@postgresql.org; Wed, 12 Mar 2014 09:38:11 +0000 MIME-Version: 1.0 Subject: BUG #9541: Result of TRIM function has changed To: pgsql-bugs@postgresql.org From: uehara.kazuki@po.ntts.co.jp Date: Wed, 12 Mar 2014 09:37:53 +0000 Message-ID: <20140312093753.335.3227@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.2 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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: 9541 Logged by: Kazuki Uehara Email address: uehara.kazuki@po.ntts.co.jp PostgreSQL version: 9.3.3 Operating system: CentOS release 5.6 Description: Depending on the version, the result of the TRIM function is different. I did the following steps. 1. Change the setting of search_path. --------------------------------------------- search_path='test,pg_catalog,"$user",public' --------------------------------------------- 2. Run the following query. ------------------------------------------- CREATE FUNCTION LTRIM(CHAR,text) RETURNS text AS 'ltrim' LANGUAGE internal STRICT; SELECT '|' || TRIM(LEADING 'a' FROM 'abcd'::char(7)) || '|'; -------------------------------------------- Execution result of each version PostgreSQL9.3.1 | postgres=# SELECT '|' || TRIM(LEADING 'a' FROM 'abcd'::char(7)) || '|'; | ?column? | ---------- | |bcd| | (1 row) PostgreSQL9.3.2: | postgres=# SELECT '|' || TRIM(LEADING 'a' FROM 'abcd'::char(7)) || '|'; | ?column? | ---------- | |bcd| | (1 row) PostgreSQL9.3.3: | postgres=# SELECT '|' || TRIM(LEADING 'a' FROM 'abcd'::char(7)) || '|'; | ?column? | ---------- | |bcd | | (1 row) Thank you very much. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs