Re: BUG #14693: create materialized view forces btrim

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ian Boardman <isb0459(at)gmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14693: create materialized view forces btrim
Date: 2017-06-06 23:29:32
Message-ID: CAKFQuwYRsoR8jtb6kw_BRzUNJqo2wkQ_p+xGV=XhTdSHECZHGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jun 6, 2017 at 2:40 PM, Ian Boardman <isb0459(at)gmail(dot)com> wrote:

> Thanks very much folks. For your entertainment, this seems to be working.
> I changed the expression to trim(from foo) || bar, in my select
> statement, and reliably got a non-empty result.
>

​So does "SELECT 'a non empty value';"...I guess if you're happy, great,
but your solution and the original problem look nothing alike.​

I committed this via "create materialized view", and inspected what
> Postgres did with it (\dSm+). It *still* is stored as btrim(foo) || bar;
> and yet, it works correctly(?!)
>

​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).

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-06-06 23:47:12 Re: BUG #14693: create materialized view forces btrim
Previous Message Mike Palmiotto 2017-06-06 21:44:16 Re: BUG #14682: row level security not work with partitioned table