pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Ian Boardman <isb0459@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14693: create materialized view forces btrim
Date: Tue, 06 Jun 2017 19:47:12 -0400
Message-ID: <6579.1496792832@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYRsoR8jtb6kw_BRzUNJqo2wkQ_p+xGV=XhTdSHECZHGw@mail.gmail.com>
References: <20170606202525.1436.76268@wrigleys.postgresql.org>
	<CAKFQuwbXXYVKnsr2G+y-WxJcWNnBzCn==7FoCVjCpn4PReZ9bQ@mail.gmail.com>
	<CA+i3Ta0FmpW-bkhg3gbyGAsskb+ZbN7Af0Ua=WnwWn6PVHezMg@mail.gmail.com>
	<CAKFQuwYRsoR8jtb6kw_BRzUNJqo2wkQ_p+xGV=XhTdSHECZHGw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> ​I don't know why btrim is the canonical spelling of the trim function but,
> like Tom said, it is.​  The choice of btrim or trim will not influence 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


-- 
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 (7+ messages)  latest in thread

Message-ID: <6579.1496792832@sss.pgh.pa.us>
Permalink:  ../6579.1496792832@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6579.1496792832@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, isb0459@gmail.com
  Subject: Re: BUG #14693: create materialized view forces btrim
  In-Reply-To: <6579.1496792832@sss.pgh.pa.us>
  References: <20170606202525.1436.76268@wrigleys.postgresql.org> <CAKFQuwbXXYVKnsr2G+y-WxJcWNnBzCn==7FoCVjCpn4PReZ9bQ@mail.gmail.com> <CA+i3Ta0FmpW-bkhg3gbyGAsskb+ZbN7Af0Ua=WnwWn6PVHezMg@mail.gmail.com> <CAKFQuwYRsoR8jtb6kw_BRzUNJqo2wkQ_p+xGV=XhTdSHECZHGw@mail.gmail.com> <6579.1496792832@sss.pgh.pa.us>

* 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