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 1uqalk-009CAj-Fj for pgsql-general@arkaria.postgresql.org; Mon, 25 Aug 2025 17:14:09 +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 1uqakl-00Brqy-Fi for pgsql-general@arkaria.postgresql.org; Mon, 25 Aug 2025 17:13:08 +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 1uqakl-00Brqq-2t for pgsql-general@lists.postgresql.org; Mon, 25 Aug 2025 17:13:07 +0000 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uqaki-001nTz-2b for pgsql-general@lists.postgresql.org; Mon, 25 Aug 2025 17:13:07 +0000 Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-61bd4ad64c7so1437687eaf.0 for ; Mon, 25 Aug 2025 10:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756141982; x=1756746782; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nlrdrpQzDLZFU6Exx/2NmAtFqDmXzEm0dy+NAnOORAU=; b=GUIV24eSuaUHP7AydNgOg0NBk2d8K1S0UKE3H3hW2se/3QCMOf5X5wYZnFjSIq7nuF E3cadQ+aw2psNsqRy6RsVlAV8KJiV5vUld+5Ddzp7gZq8VhDoyUQGCE8EJ0PWw9bt4Mj EpS18H4ybBLINHEvsQUUhEejWZObwnu9SpVvuIT9CEF7OF0JZbwZ8miXvoGL+hftn8Nb NyXsBZKvnSNJoYr7TUqDDqvIWXramdAUL2cicoalUsWAjmUnGp8mgB1dhoGsmugpFZyz pXkU7TKXtpsKRUgO8fJj0w67er1h6sS1MvAXu8cqGcWhnHWHyFh7P8kyd6WvsbAex4ua CSUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756141982; x=1756746782; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nlrdrpQzDLZFU6Exx/2NmAtFqDmXzEm0dy+NAnOORAU=; b=tUPVvgK+EuiwYSDtZQYvl3hfTfot7fVnHDt8/GlrkXQZCRcWgH+cxS9rEBE7BFFvLD 88fkHcQ4XwEDowJpF8xrg4pOruuV2sTDifdncaHfSFVr9L+bhlusHVbrhLhcLN81enYi +iojPXRTEmT+AOuzzsPs/QCg4ddq6m886wQvS9XF9GoxTEb0mx5vCJUSb0e8GcegCKj7 zZa/Gm70MvvaVm6mPWZG3honlf8V7m4F2d1fcQNt8XqAMsSkp3ib7+ioTcOzI+oRFWET GQ5uG65lba/GxSKD4tvvCHobs7OHX5TdAme9ms7udpsP2IsuzR0e+FRFT/lv5rWI6ebZ UhdA== X-Gm-Message-State: AOJu0YwPFqIG76B1Hi6EM93iKC2FnPmywOHTy9/yit8qJLXKx2iUb8Oy eO8bPfFtGkDebSgTF3J9jvRrG6dfkPs7E/Pw/ex5uqGF7D4+RwsC2DxmQRdLT3unZ2vhK5TF3za 9IJhUeN3yhxGk99YcK7rqoWAutKlgG48= X-Gm-Gg: ASbGncvouS35EuayIyLFzJxDZ5eBJu1jsG+QK+Rc8u2JaVx8RnTOkJUqmx8KV5u496n n5zMBYRtFkOQd3Yyhmz2NN3QbacnYpxDFhlBgxOCQY51tgCAMKbLZhcictTB3kOUeRgWxIBTxPB gHwKArRjvD/7uPKxJKl5F93aMDKPAHmXxWj40APY9meuXACVFC/tybERy6mbrv8ZYJQDPWtqMvg cWQ32aGQg== X-Google-Smtp-Source: AGHT+IFI1nRQcKTL+bQ4NbsGr/wJOcb0ByY8T/oMVLEYr/nx4oXwiTOujzsM8sRto0sS61ypBcz12iqfsFhREvQMzb0= X-Received: by 2002:a05:6808:16a4:b0:434:231:3e41 with SMTP id 5614622812f47-437853428camr6360040b6e.38.1756141982191; Mon, 25 Aug 2025 10:13:02 -0700 (PDT) MIME-Version: 1.0 References: <3a6e840a-5c30-4eed-9e5b-474dafc6c29f@aklaver.com> In-Reply-To: From: Dominique Devienne Date: Mon, 25 Aug 2025 19:12:50 +0200 X-Gm-Features: Ac12FXzOsDgoP1sCM7MrmmIZswBVu5j8l9XWVxGWI0n5cK5D2ekoBQkeE8Dxd7k Message-ID: Subject: Re: DISABLE TRIGGER doc wrong? To: Adrian Klaver Cc: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Aug 25, 2025 at 6:33=E2=80=AFPM Dominique Devienne wrote: > On Mon, Aug 25, 2025 at 6:24=E2=80=AFPM Adrian Klaver wrote: > > On 8/25/25 09:19, Dominique Devienne wrote: > > > or I'm reading it wrong? --DD > > > > > > From https://www.postgresql.org/docs/current/sql-altertable.html#SQL= -ALTERTABLE-DESC-DISABLE-ENABLE-TRIGGER: > > >> Disabling or enabling internally generated constraint triggers requi= res superuser privileges > > > > > > We were disabling triggers as the owner of the table just fine, no > > > SUPERUSER involved. So is the doc out-of-date? > > > > From the sentence before the above: > > > > "... internally generated constraint triggers, such as those that are > > used to implement foreign key constraints or deferrable uniqueness and > > exclusion constraints)." > > And? I don't see your point Adrian. > Has no bearing on the SUPERUSER requirement, in my reading. OK, maybe my initial was poorly worded. Let me try again: We were ALTER TABLE {}.{} DISABLE TRIGGER ALL as the table owner. ALL includes "internally generated constraint triggers", FKs in our case. Yet the doc clearly states one must be SUPERUSER to do that. Thus the doc should say "requires owning the altered table, or have superuser privileges", no? Hope this is a clearer inquiry. Thanks, --DD