From: nte@mustinformatique.fr
To: pgsql-bugs@postgresql.org
Subject: BUG #14478: Right Trim trims too much?
Date: Mon, 26 Dec 2016 09:36:34 +0000
Message-ID: <20161226093634.10135.18443@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: 14478
Logged by: Nathanael TERRIEN
Email address: nte@mustinformatique.fr
PostgreSQL version: 9.6.1
Operating system: Windows
Description:
Not sure if a bug or if I'm missing something but this query produces weird
results with TRIM and TRIM:
SELECT DISTINCT TRIM(TRAILING FROM 'cnam_lpp_histo_io','_io') AS "A"
,RTRIM('cnam_lpp_histo_io','_io') AS "B"
,REPLACE('cnam_lpp_histo_io','_io','') AS "C"
,REGEXP_REPLACE('cnam_lpp_histo_io','_io$','') AS "D";
Results A and B seems wrong to me (C and D are OK):
A=cnam_lpp_hist
B=cnam_lpp_hist
C=cnam_lpp_histo
D=cnam_lpp_histo
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: nte@mustinformatique.fr
Subject: Re: BUG #14478: Right Trim trims too much?
In-Reply-To: <20161226093634.10135.18443@wrigleys.postgresql.org>
References: <20161226093634.10135.18443@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