Re: [BUGS] BUG #14693: create materialized view forces btrim - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14693: create materialized view forces btrim
Date
Msg-id 6579.1496792832@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #14693: create materialized view forces btrim  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-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

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [BUGS] BUG #14693: create materialized view forces btrim
Next
From: Joe Conway
Date:
Subject: Re: [BUGS] BUG #14682: row level security not work with partitionedtable