public inbox for [email protected]  
help / color / mirror / Atom feed
Re: DISABLE TRIGGER doc wrong?
3+ messages / 2 participants
[nested] [flat]

* Re: DISABLE TRIGGER doc wrong?
@ 2025-08-25 16:24  Adrian Klaver <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Adrian Klaver @ 2025-08-25 16:24 UTC (permalink / raw)
  To: Dominique Devienne <[email protected]>; [email protected]

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-TRIGG...:
>> Disabling or enabling internally generated constraint triggers requires 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)."

> 
> PS: By mistake... We were ALTER TABLE {}.{} DISABLE TRIGGER ALL
>    when we meant ALTER TABLE {}.{} DISABLE TRIGGER USER
> 
> 


-- 
Adrian Klaver
[email protected]






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: DISABLE TRIGGER doc wrong?
@ 2025-08-25 16:33  Dominique Devienne <[email protected]>
  parent: Adrian Klaver <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Dominique Devienne @ 2025-08-25 16:33 UTC (permalink / raw)
  To: Adrian Klaver <[email protected]>; +Cc: [email protected]

On Mon, Aug 25, 2025 at 6:24 PM Adrian Klaver <[email protected]> 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-TRIGG...:
> >> Disabling or enabling internally generated constraint triggers requires 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.






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: DISABLE TRIGGER doc wrong?
@ 2025-08-25 17:12  Dominique Devienne <[email protected]>
  parent: Dominique Devienne <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Dominique Devienne @ 2025-08-25 17:12 UTC (permalink / raw)
  To: Adrian Klaver <[email protected]>; +Cc: [email protected]

On Mon, Aug 25, 2025 at 6:33 PM Dominique Devienne <[email protected]> wrote:
> On Mon, Aug 25, 2025 at 6:24 PM Adrian Klaver <[email protected]> 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-TRIGG...:
> > >> Disabling or enabling internally generated constraint triggers requires 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






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-08-25 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-08-25 16:24 Re: DISABLE TRIGGER doc wrong? Adrian Klaver <[email protected]>
2025-08-25 16:33 ` Dominique Devienne <[email protected]>
2025-08-25 17:12   ` Dominique Devienne <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox