Lists: | pgsql-bugs |
---|
From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | ochedru(at)gmail(dot)com |
Subject: | BUG #17930: Regression in DISABLE TRIGGER ALL |
Date: | 2023-05-12 07:52:13 |
Message-ID: | 17930-73168e744fdf85c0@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 17930
Logged by: Olivier Chédru
Email address: ochedru(at)gmail(dot)com
PostgreSQL version: 15.3
Operating system: Linux
Description:
Hi!
The following script creates a partition table with a foreign key and works
fine on PostgreSQL 14:
begin;
create table a(id int primary key);
create table b(id int primary key, a_id int not null references a(id))
partition by range(id);
create table b_default(like b including defaults including constraints);
alter table b attach partition b_default default;
alter table b disable trigger all;
commit;
On PostgresSQL 15, it fails on DISABLE TRIGGER ALL:
ERROR: trigger "RI_ConstraintTrigger_c_20196703" for table "b_default" does
not exist
It seems to use a wrong trigger name. In this case,
RI_ConstraintTrigger_c_20196703 is the name of a trigger defined on the
parent table b.
Thank you.
From: | Olivier Chédru <ochedru(at)gmail(dot)com> |
---|---|
To: | ochedru(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17930: Regression in DISABLE TRIGGER ALL |
Date: | 2023-05-12 13:02:11 |
Message-ID: | CAC1_XpS5zDhAVObBFTjJqzzhhhX8jk1RMV_C0p7NOc8GZRpp5g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
My bad, this issue is a duplicate of bug #17817 and has been fixed in
PostgreSQL 15.3.
Sorry for the spam.
On Fri, May 12, 2023 at 9:53 AM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17930
> Logged by: Olivier Chédru
> Email address: ochedru(at)gmail(dot)com
> PostgreSQL version: 15.3
> Operating system: Linux
> Description:
>
> Hi!
>
> The following script creates a partition table with a foreign key and works
> fine on PostgreSQL 14:
>
> begin;
> create table a(id int primary key);
> create table b(id int primary key, a_id int not null references a(id))
> partition by range(id);
> create table b_default(like b including defaults including constraints);
> alter table b attach partition b_default default;
> alter table b disable trigger all;
> commit;
>
> On PostgresSQL 15, it fails on DISABLE TRIGGER ALL:
>
> ERROR: trigger "RI_ConstraintTrigger_c_20196703" for table "b_default"
> does
> not exist
>
> It seems to use a wrong trigger name. In this case,
> RI_ConstraintTrigger_c_20196703 is the name of a trigger defined on the
> parent table b.
>
> Thank you.
>
>
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | ochedru(at)gmail(dot)com |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17930: Regression in DISABLE TRIGGER ALL |
Date: | 2023-05-12 13:39:00 |
Message-ID: | 1315366.1683898740@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> The following script creates a partition table with a foreign key and works
> fine on PostgreSQL 14:
> begin;
> create table a(id int primary key);
> create table b(id int primary key, a_id int not null references a(id))
> partition by range(id);
> create table b_default(like b including defaults including constraints);
> alter table b attach partition b_default default;
> alter table b disable trigger all;
> commit;
> On PostgresSQL 15, it fails on DISABLE TRIGGER ALL:
> ERROR: trigger "RI_ConstraintTrigger_c_20196703" for table "b_default" does
> not exist
It works for me with 15.3. I don't think you are actually running
15.3 (i.e., yesterday's minor release), because this symptom matches
a bug we fixed in 15.3.
regards, tom lane