From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Dominique Devienne <ddevienne(at)gmail(dot)com>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: DISABLE TRIGGER doc wrong? |
Date: | 2025-08-25 17:33:35 |
Message-ID: | 26239cd6-a13d-4137-9f1d-61e18c4cf0e6@aklaver.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 8/25/25 10:24, Dominique Devienne wrote:
> On Mon, Aug 25, 2025 at 7:13 PM Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> wrote:
>> On 25.08.2025 19:19, Dominique Devienne wrote:
>> Simple experiment shows that it is still up to date:
>
>> alice(at)postgres(17.5)=> alter table t disable trigger "RI_ConstraintTrigger_a_1260370";
>> ERROR: permission denied: "RI_ConstraintTrigger_a_1260370" is a system trigger
>> alice(at)postgres(17.5)=> \c - postgres
>> You are now connected to database "postgres" as user "postgres".
>> postgres(at)postgres(17.5)=# alter table t disable trigger "RI_ConstraintTrigger_a_1260370";
>> ALTER TABLE
>
> We were using ALL, successfully but incorrectly, and are now using
> USER, successfully.
> Not a named constraint trigger as you did. Could it be ALL implicitly
> excludes such constraint triggers, when not SUPERUSER? And thus, as
> the table owner, ALL == USER, implicitly? If that's the case, then the
> doc still needs clarifications IMHO. --DD
>
>
I am not seeing it:
select version();
version
-----------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 17.6 (Ubuntu 17.6-1.pgdg22.04+1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
create table test_table_parent(id integer primary key, fld varchar);
create table test_table_child(id integer primary key, fld_child varchar,
parent_id integer references test_table_parent on update cascade);
\dt+ test_table_child
List of tables
Schema | Name | Type | Owner | Persistence | Access
method | Size | Description
--------+------------------+-------+---------+-------------+---------------+------------+-------------
public | test_table_child | table | db_user | permanent | heap
| 8192 bytes | NULL
\du+ db_user
List of roles
Role name | Attributes | Description
-----------+------------+-------------
db_user | |
alter table test_table_child disable trigger all;
ERROR: permission denied: "RI_ConstraintTrigger_c_121933" is a system
trigger
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | DINESH NAIR | 2025-08-25 18:42:20 | Re: Q: GRANT ... WITH ADMIN on PG 17 |
Previous Message | Dominique Devienne | 2025-08-25 17:24:06 | Re: DISABLE TRIGGER doc wrong? |