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.98.2) (envelope-from ) id 1xGeYr-00000002XYT-0VbP for pgsql-general@arkaria.postgresql.org; Tue, 13 Oct 2026 15:37:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xGeYp-0000000EulA-4B4H for pgsql-general@arkaria.postgresql.org; Tue, 13 Oct 2026 15:37:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xGeYp-0000000Eul1-2XyJ for pgsql-general@lists.postgresql.org; Tue, 13 Oct 2026 15:37:03 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xGeYn-00000001tck-1kRt for pgsql-general@postgresql.org; Tue, 13 Oct 2026 15:37:03 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2d71d1cc8b2so16621945ad.1 for ; Tue, 13 Oct 2026 08:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791905819; x=1792510619; darn=postgresql.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:content-type:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Ml5KHruUWav7WbS6cWBnggYWpIIJyHh0XkXaOjbeDaM=; b=BH8WV6PNtJshY7CAHorPbLyYohReMO7WO+IyIexpcEFiVB/ggfeR7foP57AvitkH3I Vcx8v1cKCa3oC0aEuerm6sR5md/u2elCAnKhgtf0QMxxMr+SvlAjb9IFFYp76bhMPmVF BjlaFcbtertPH5qtWdC58qmJcyT1IegogUyVEw+rCqglcotTQJYnKxi3AQaLoTkKhw9o IreUN567JOZQMn3CebBXrgc5IgbM54mjaP/+T3/ZyIDUE584/y/6OKQjGHzIMIb2GWto ggPc9TJuCeDg63BPdTPZ/s+I37FoBPs8ffWGScCnxibOipCsk3uHwfPrhAwTOJA+lEga cwgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791905819; x=1792510619; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Ml5KHruUWav7WbS6cWBnggYWpIIJyHh0XkXaOjbeDaM=; b=eKriL1jALyyddQadD6OqP3xlecYky8V4AJT8z+jCZ5ZZyDXrtY5VjUaJH0icKEULqY 3rk2Y+RUOnLfzCEBvjYEkIK4/EXozuAXQHkWPQeIBvMyfaeCNayrSoEP72I5TX4O+enX GbK09V3iE1A5dD4Z0pXj6hJ/s4IBwW1v8nvU9FRzGFOoups3uD2cpRhtZ4KLA/Il4riN hq0qXLdW8BpsFBLX0X8MR68fVKV7MGjk3gH8DCQZKC6znJ/TGPTpYdj8bN5SFONWRzJT V0ORnnpbBWqnbEMQGpCokwvseHoyehGaK1tDUDvU5wSndTumA/wZX7jZGIt7vdFmA4Gz nhiQ== X-Forwarded-Encrypted: i=1; AKwUvBw4HokhAZeXbBe6KlE80u75kxCvAvt4uXULaA8QtjWp7RtIAcn0Ia3j2ZCuXpY1qR3kuRoCR0atWf+7uVZ8@postgresql.org X-Gm-Message-State: AFq9FYIR9osI9sLeEcMTE90cLzsKzN96U+9qVP8QFo+yPX0Oc5b8BqHP bO4YpBqwo4WiB6+f88b/TyWB0KVHGjMTx4QSW3guRqLLrFb277Ewl6L8 X-Gm-Gg: AYBFou3wgL9MG9q5KZ+2YQrzvJcrpRBzIsAsNaoZpQOZEA47Q/zm81uu/69iXXZOMgB e7M7l+EszJK/tZFfsMrEAUiztFMae53UcyplE8cc1/gIMNDdhjCXL8JKF0Xb9abKV1vSO3vDsa2 i6BUINh0JDdNqe9NacwHVPko8YfhZ1mYEF86j3k9DhpIJ5HVknZuktUQsac+nFJG0CI07dWBa0n +TD9+BuyOyh1OLJlCZJj4wWeRQYnhIvTaoMpBggGZrHaNasEWRXp80FtZhmLhUudcptZzyNyOrh krFyxOEnsyaI2i5xzZicvVHvN/ujn5MKXFCaWgjqoyv01/enjHhXhWbLLfrx1PpLcLMoSQ+nf/N DcGXBiMxOVfmW6jKAkWc16uMRsT3Y2fVZDb9LRzdHgxyVhhZupAbzyRh0xGSVBcRV8x0GenkqeZ 3fGcbSUNQhehb11URECozzw4//FqXDHehGEHLPNgNpw/6FFfkSWP56pgeWOj82dB9Ymdc23lig/ QYZJwOTS3xmQCbcf/hVFH1M7ax/HIk= X-Received: by 2002:a17:902:cec2:b0:2e6:1715:e48d with SMTP id d9443c01a7336-2e842ac8863mr126427935ad.35.1791905818519; Tue, 13 Oct 2026 08:36:58 -0700 (PDT) Received: from smtpclient.apple ([2601:681:4c00:3ee7:dcab:4f10:e20d:cf74]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8483c3dfcsm57010485ad.24.2026.10.13.08.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2026 08:36:58 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Rob Sargent Mime-Version: 1.0 (1.0) Subject: Re: Why is materialized view creation a "security-restricted operation"? Date: Tue, 13 Oct 2026 09:36:47 -0600 Message-Id: <9B7D623E-1DEF-46DC-92B3-FF9452624F5C@gmail.com> References: <3b50a3393fd84d56b40cfddd67c98dbc@stmuk.bayern.de> Cc: Laurenz Albe , Adrian Klaver , pgsql-general@postgresql.org, Matthias Haupt In-Reply-To: <3b50a3393fd84d56b40cfddd67c98dbc@stmuk.bayern.de> To: =?utf-8?Q?Franz-Josef_F=C3=A4rber?= X-Mailer: iPhone Mail (23G83) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Oct 13, 2026, at 08:17, F=C3=A4rber, Franz-Josef (StMUK) wrote: >=20 > =EF=BB=BF >>=20 >> Well, you want to use a materialized view for something that it cannot be= used for, for security reasons. We tried to explain that in this thread. > Yes, you can see it this way: One way would be: Using Temp Tables. This wa= y is blocked due to security reasons. Discussion finished. >=20 > Another point of view is: > 0) The security problem is not inherent for what I was trying to archieve;= but due to lack of expressiveness one is forced into this dead end. > 1) Either: Postgres' COPY stmt lacks the ability to omit the physical tabl= e, something like SELECT * FROM COPY FROM ... > 2) or: Postgres lacks table variables. >=20 I am not clear on your workflow so these questions come to mind: What do you do with the undefined =E2=80=9C*=E2=80=9D (if it were allowed)? = =20 Would you not have to predefine the columns of the table variable?=