Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIOCe-0002BH-Cq for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Jun 2017 23:48:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dIOCd-0002tU-RM for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Jun 2017 23:47:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dIOBx-0001fy-Af for pgsql-bugs@postgresql.org; Tue, 06 Jun 2017 23:47:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dIOBu-0005HK-S4 for pgsql-bugs@postgresql.org; Tue, 06 Jun 2017 23:47:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v56NlCXM006580; Tue, 6 Jun 2017 19:47:12 -0400 From: Tom Lane To: "David G. Johnston" cc: Ian Boardman , "pgsql-bugs@postgresql.org" Subject: Re: BUG #14693: create materialized view forces btrim In-reply-to: References: <20170606202525.1436.76268@wrigleys.postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Tue, 06 Jun 2017 16:29:32 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <6578.1496792832.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 06 Jun 2017 19:47:12 -0400 Message-ID: <6579.1496792832@sss.pgh.pa.us> 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 "David G. Johnston" writes: > =E2=80=8BI don't know why btrim is the canonical spelling of the trim fun= ction but, > like Tom said, it is.=E2=80=8B The choice of btrim or trim will not infl= uence the > end result of the query in any way (though I don't think btrim accepts the > "from" keyword that trim does). FWIW, btrim is just a plain function. Our grammar maps the weird syntax defined by the SQL standard for TRIM() into a call of btrim, ltrim, or rtrim depending on what keywords appear. The functionality is the same whether you go through that syntax or just use btrim directly. I'm inclined to suspect that the OP's real problem has to do with confusion between empty strings and nulls, but it's hard to be sure with no concrete example. regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs