Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDvp1-00038y-KR for pgsql-bugs@arkaria.postgresql.org; Sun, 12 Nov 2017 17:13:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eDvp0-0007D9-Gx for pgsql-bugs@arkaria.postgresql.org; Sun, 12 Nov 2017 17:13:26 +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 1eDvoD-0005s1-Ll for pgsql-bugs@postgresql.org; Sun, 12 Nov 2017 17:12:37 +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.89) (envelope-from ) id 1eDvoB-0005Xa-1v for pgsql-bugs@postgresql.org; Sun, 12 Nov 2017 17:12:36 +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 vACHCXqI001981; Sun, 12 Nov 2017 12:12:33 -0500 From: Tom Lane To: neil@postgrescompare.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14900: MView not null constraint In-reply-to: <20171112031621.31521.10140@wrigleys.postgresql.org> References: <20171112031621.31521.10140@wrigleys.postgresql.org> Comments: In-reply-to neil@postgrescompare.com message dated "Sun, 12 Nov 2017 03:16:21 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1979.1510506753.1@sss.pgh.pa.us> Date: Sun, 12 Nov 2017 12:12:33 -0500 Message-ID: <1980.1510506753@sss.pgh.pa.us> 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 neil@postgrescompare.com writes: > This is probably not a bug Nope, it isn't. > If it's not a bug should postgres support > ALTER MATERIALIZED VIEW ALTER COLUMN column SET NOT NULL syntax? Doesn't seem like a great idea to me. What's supposed to happen if a view update would result in a violation of the constraint? It's way too late to undo whatever change of the underlying data caused that, so it seems like the only possible answer is for REFRESHes to fail, resulting in the view getting more and more out of date until and unless something manual is done to resolve the problem. I can't see that that's a useful behavior to have. 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