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

From isb0459@gmail.com
Subject [BUGS] BUG #14693: create materialized view forces btrim
Date
Msg-id 20170606202525.1436.76268@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14693: create materialized view forces btrim  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [BUGS] BUG #14693: create materialized view forces btrim  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: [BUGS] BUG #14693: create materialized view forces btrim  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14693
Logged by:          Ian Boardman
Email address:      isb0459@gmail.com
PostgreSQL version: 9.4.9
Operating system:   Fedora 23
Description:

I am trying to create a materialized view. I have a working SQL query that
uses this expression: coalesce(trim(foo), bar). When I use that in the
definition for create materialized view, Postgres force replaces the trim()
call into a btrim() and breaks the query result. In my specific case, all
the values become empty instead of yielding either the trimmed "foo" or the
"bar" fields if trimmed "foo" is empty. Is there a way to make Postgres use
the function trim as I require?


--
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: Joe Conway
Date:
Subject: Re: [BUGS] BUG #14682: row level security not work with partitionedtable
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14693: create materialized view forces btrim