Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jr7eL-0002Qr-3k for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 22:25:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jr7eI-0001G8-Rz for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 22:25:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jr7eI-0001G1-Jw for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 22:25:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jr7eG-0003KC-6U for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 22:25:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 062MPcJC891330; Thu, 2 Jul 2020 18:25:38 -0400 From: Tom Lane To: Anders Steinlein cc: pgsql-general Subject: Re: Different results from identical matviews In-reply-to: References: <815598.1593648137@sss.pgh.pa.us> <849797.1593697489@sss.pgh.pa.us> <854382.1593704633@sss.pgh.pa.us> <889660.1593726293@sss.pgh.pa.us> Comments: In-reply-to Anders Steinlein message dated "Fri, 03 Jul 2020 00:05:27 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <891328.1593728738.1@sss.pgh.pa.us> Date: Thu, 02 Jul 2020 18:25:38 -0400 Message-ID: <891329.1593728738@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Anders Steinlein writes: > Am I right in thinking that we should actually go over (i.e. re-create) all > functions and views defined before this dump/restore where we're using JOIN > ... USING (citext_column)? We most definitely have many more such cases, > since this is the common (perhaps naive) way we've written joins (unless > there are obvious reasons to be explicit). :-/ If it's not clear to you how this matview came to be different from the rest, then it certainly seems likely that other ones might have the same disease. Note that functions don't really have this sort of issue, since they're just stored as text. Only a view or matview would preserve creation-time decisions about interpretation. regards, tom lane