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 1ugBiB-00H3HB-Go for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jul 2025 00:27:28 +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 1ugBi8-002p5s-NY for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jul 2025 00:27:25 +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.94.2) (envelope-from ) id 1ugBi8-002p4z-BE for pgsql-hackers@lists.postgresql.org; Mon, 28 Jul 2025 00:27:24 +0000 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ugBi5-001CoM-17 for pgsql-hackers@postgresql.org; Mon, 28 Jul 2025 00:27:24 +0000 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-41eaf97416eso2159759b6e.0 for ; Sun, 27 Jul 2025 17:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753662440; x=1754267240; darn=postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yzc99g7of2ztiVg+dJe1iiPoRX7hgFo3ptYbKCDzakg=; b=IdRRuGE8FS/RZ2VHhVL+Au2qprU55gr1FiHjG6ZZEk+xgCGzSYnPr9YSLTetaSgUQQ mSooT1TkY6+sDflhgYjBrb6+R7BRBtSXinwXA9CuY4MXg+ja6649iZBr0BsZTEhzz0jF 6/AKbDZQ5MfZtrG4E54G/2aVdZqXm6ceuBtGykVTZ+zwsQ7ZPwV44E89yF5rOcVKLTav /6ojVTjy9BczpFOOBUXB+a7YNDmUgVP2Z09OduGxJnMAXFToYYw75SJjHgzlRHSXzVMp qit7v8/HGJkUcNHJ6tTMrz5gUpBKhO0+BLh4mj9SlROMyShWEM4rZ7i5CTb0IrIlOpTB LkWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753662440; x=1754267240; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yzc99g7of2ztiVg+dJe1iiPoRX7hgFo3ptYbKCDzakg=; b=SqU18vuz6eoJ3A140b3g2W6REFYgfbHtBaX0zAi0FdkTyz4FAfuILbIT1U2GipNp7p 3NTAMzWVSL4HYRAEl6/bhzq6bdJ/raIeA8xC13HMBRLDZjC3UvaAxBF87CZAGgLYOqGS ePVh4hCw+67rk+dluQJbF1AgYhpT6kPhmQoBIkMCabqpRZcvh2AnlUFXn8OjwFOYdMRc tQmWirgLGWU5G5cdKouchtSQeI/vStCgl80aqav0qA4H/ler8x96Phua6odlgXDVYlAR ypUldDtwO30VlnmyXkN/59dqnBjg5j2eNWqIGGlv5B9S7oNiE3wHTV3fZ1Hue+0h3rjx fB/A== X-Forwarded-Encrypted: i=1; AJvYcCWUareu0ASJTWM2OiDP+pO3vOu7IArVY6sNcrsZPrIqkxdci3+c5pnyeDjh72f35TVhfeHuYf/VlY08cKFK@postgresql.org X-Gm-Message-State: AOJu0Yyg1WZaGT6wpN+BA2ihL0tn4YETMKDViVLAVwDXgvPLVFl9/TRe HK3Fc0pMVF3N/jC3EuIy01dPEWt72lp6WVb3YgJfi133YMWhhupOeilbHBluZIKoLNBbomIoc2p WbfQTROHAQamsTQRd2hioszVeTUWEIY0= X-Gm-Gg: ASbGnctQd6sYj3KMwtfAjl+kLeAYv+ZDntlTt+ghe8VkVL2ciZUesSUJ2x+dAzbsS6U JwX/3mSHrPbc0zs7TVKg7mwUnXQL1EyvzjsvpV4CNtVLiPRuTfKA0M6t634vXCzBVW2iKXSd00R NUZWLjVLxSgZTP0pllQQZ9Zf//cpUs1BkJUn6MyP/QhQwGkER6bta+nZjLTaLAD+lzL4ihIlsY3 NVEzmE+0Jej5e5UZA== X-Google-Smtp-Source: AGHT+IH8ky/BaXN8MaNoXOn69zU8w0pzQkb0y/YLoYtteGSXXYYOe+VowSoKhg6+RCzmbHF/uqtgknrPBH96X52k1EQ= X-Received: by 2002:a05:6808:14c6:b0:41b:e029:bba8 with SMTP id 5614622812f47-42bb8976968mr5419548b6e.17.1753662439593; Sun, 27 Jul 2025 17:27:19 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6802:3296:b0:5da:a024:6db9 with HTTP; Sun, 27 Jul 2025 17:27:18 -0700 (PDT) In-Reply-To: References: <585e996c-a5c6-4e61-acc4-d92b7a1458ea@vondra.me> From: "David G. Johnston" Date: Sun, 27 Jul 2025 17:27:18 -0700 X-Gm-Features: Ac12FXz0fwOfXiUE3OTSWohi2HmmqLRtbiEpyvxdgzyOW1DKYwPHK5g8gsvzRlI Message-ID: Subject: Re: Extension security improvement: Add support for extensions with an owned schema To: Sadeq Dousti Cc: Jelte Fennema-Nio , Tomas Vondra , Jeff Davis , PostgreSQL-development , "David E. Wheeler" , Artem Gavrilov Content-Type: multipart/alternative; boundary="000000000000c49bba063af25a2e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c49bba063af25a2e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sunday, July 27, 2025, Sadeq Dousti wrote: > > (a) The patch affects DROP EXTENSION in that it drops the schema as well, > if it's owned by the extension. This needs to be mentioned in the > documentation. In addition, an extra confirmation (e.g., "This will drop > schema nnnn as well, do you wish to continue?") when dropping the > extension might be desired, as the extension schema could contain user > data (e.g., pg_cron keeps the jobs and their execution details). > SQL isn=E2=80=99t interactive in this sense. There isn=E2=80=99t a way to = ask =E2=80=9Care you sure?=E2=80=9D. At best the server can refuse to do something unless addit= ional options, like =E2=80=9Cforce/cascade=E2=80=9D are present in the command. David J. --000000000000c49bba063af25a2e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sunday, July 27, 2025, Sadeq Dousti <msdousti@gmail.com> wrote:
<= div dir=3D"ltr">
(a) The patch affects DROP EXTENSION in that it drops t= he schema as well, if it's owned by the extension. This needs to be men= tioned in the documentation. In addition, an extra confirmation (e.g., "Th= is will drop schema nnnn as well, do you wish to continue?") wh= en dropping the extension might be desired, as the extension schema c= ould contain user data (e.g., pg_cron keeps the jobs and their execution de= tails).

SQL isn=E2=80=99t interac= tive in this sense.=C2=A0 There isn=E2=80=99t a way to ask =E2=80=9Care you= sure?=E2=80=9D.=C2=A0 At best the server can refuse to do something unless= additional options, like =E2=80=9Cforce/cascade=E2=80=9D are present in th= e command.

David J.
=C2=A0
--000000000000c49bba063af25a2e--