Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smkwL-0081qW-BG for pgsql-admin@arkaria.postgresql.org; Sat, 07 Sep 2024 02:12:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1smkwI-008OUM-SY for pgsql-admin@arkaria.postgresql.org; Sat, 07 Sep 2024 02:12:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smkwI-008OUE-Fh for pgsql-admin@lists.postgresql.org; Sat, 07 Sep 2024 02:12:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smkwG-000WsK-BD for pgsql-admin@postgresql.org; Sat, 07 Sep 2024 02:12:37 +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 4872CYs62410483; Fri, 6 Sep 2024 22:12:34 -0400 From: Tom Lane To: Wells Oliver cc: pgsql-admin Subject: Re: pg_restore and materialized view deps In-reply-to: References: <2406327.1725672781@sss.pgh.pa.us> Comments: In-reply-to Wells Oliver message dated "Fri, 06 Sep 2024 18:41:22 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2410481.1725675154.1@sss.pgh.pa.us> Date: Fri, 06 Sep 2024 22:12:34 -0400 Message-ID: <2410482.1725675154@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Wells Oliver writes: > Ah, you know, a little deeper: it's an issue with a mat view unable to > refresh because it uses a function, and within that function, there is a > call to a mat view not yet materialized. Oh yes, pg_dump can't really see dependencies inside function bodies. ... Unless ... can you write the function as a new-style SQL function (BEGIN ATOMIC instead of a string literal)? Then I think it might work. regards, tom lane