Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dILO7-0000gy-PN for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Jun 2017 20:47:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dILO7-0000Tf-8g for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Jun 2017 20:47:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dILNQ-00078e-75 for pgsql-bugs@postgresql.org; Tue, 06 Jun 2017 20:46:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dILNN-0006am-JW for pgsql-bugs@postgresql.org; Tue, 06 Jun 2017 20:46:55 +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 v56Kkq4X032465; Tue, 6 Jun 2017 16:46:52 -0400 From: Tom Lane To: isb0459@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14693: create materialized view forces btrim In-reply-to: <20170606202525.1436.76268@wrigleys.postgresql.org> References: <20170606202525.1436.76268@wrigleys.postgresql.org> Comments: In-reply-to isb0459@gmail.com message dated "Tue, 06 Jun 2017 20:25:25 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32463.1496782012.1@sss.pgh.pa.us> Date: Tue, 06 Jun 2017 16:46:52 -0400 Message-ID: <32464.1496782012@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 isb0459@gmail.com writes: > 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. trim() *is* btrim(). Whatever's going on here, you've leapt to an incorrect conclusion about the cause. How about showing us a self-contained example of your problem? https://wiki.postgresql.org/wiki/Guide_to_reporting_problems 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