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 1jxFLF-0000C0-O2 for pgsql-general@arkaria.postgresql.org; Sun, 19 Jul 2020 19:51:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jxFLD-0006vV-B9 for pgsql-general@arkaria.postgresql.org; Sun, 19 Jul 2020 19:51:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxFLD-0006vM-3j for pgsql-general@lists.postgresql.org; Sun, 19 Jul 2020 19:51:19 +0000 Received: from mail.am-soft.de ([83.218.36.120]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxFLA-00026Z-58 for pgsql-general@lists.postgresql.org; Sun, 19 Jul 2020 19:51:18 +0000 Received: from mail.am-soft.de (localhost [127.0.0.1]) by mail.am-soft.de (Postfix) with ESMTP id 09A102BDE8BA for ; Sun, 19 Jul 2020 21:51:15 +0200 (CEST) Received: from tschoening-nb.fritz.box (unknown [77.78.163.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.am-soft.de (Postfix) with ESMTPSA id DA0302BDE8B8 for ; Sun, 19 Jul 2020 21:51:13 +0200 (CEST) Date: Sun, 19 Jul 2020 21:51:12 +0200 From: =?windows-1250?Q?Thorsten_Sch=F6ning?= Organization: AM-SoFT GmbH IT-Systeme Message-ID: <1834098334.20200719215112@am-soft.de> To: pgsql-general@lists.postgresql.org Subject: Re: How to restore a dump containing CASTs into a database with a new user? In-Reply-To: <206414.1595183867@sss.pgh.pa.us> References: <1566481610.20200719202547@am-soft.de> <206414.1595183867@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: quoted-printable X-AV-Checked: ClamAV using ClamSMTP List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Guten Tag Tom Lane, am Sonntag, 19. Juli 2020 um 20:37 schrieben Sie: > It's a security thing. A user who can create such a cast can thereby > change the behavior of other people's queries. I'm not sure what your are telling me: Can CASTs only be created by superusers? I didn't read that in the docs. If they are not only created by superusers, how can I restore CASTs to a database owned by some other user? There are no other users than the one owning the database in my case. Even if there was, I don't see why CASTs should be handled differently than all other objects successfully restored to have a new owner, when CASTs seem to be per database as well. Looking at the source database, the CASTs in question are only shown for the database they are used in, no other. Mit freundlichen Gr=FC=DFen, Thorsten Sch=F6ning --=20 Thorsten Sch=F6ning E-Mail: Thorsten.Schoening@AM-SoFT.de AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...........05151- 9468- 55 Fax...............05151- 9468- 88 Mobil..............0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Gesch=E4ftsf=FChrer: Andreas Muchow