Re: BUG #17085: Should be able to create an index without referential checking when ON DELETE NO ACTION - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #17085: Should be able to create an index without referential checking when ON DELETE NO ACTION
Date
Msg-id CAKFQuwatZQkAFOBDHmiwLeKvHawLTtx5jUX-wRXGW863efgMJw@mail.gmail.com
Whole thread Raw
In response to BUG #17085: Should be able to create an index without referential checking when ON DELETE NO ACTION  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Tue, Jul 6, 2021 at 5:33 PM Victor Porton <porton.victor@gmail.com> wrote:

That's a typo, I meant foreign keys, not indexes.

OK, then add the "NOT VALID" qualifier to your ALTER TABLE command.  But you will have to perform validation at some point...

Anyway, after following my advice PostgreSQL would become more "logical" and more convenient for users.

There is no reason to have different rules for ALTER TABLE and for DELETE/UPDATE.

It's hard to follow the advice contained in an email that doesn't seem to understand how things work today.

The subject of the report - which isn't a bug by the way - is to skip referential checking when adding an index.  PostgreSQL doesn't do that today...

David J.

pgsql-bugs by date:

Previous
From: Victor Porton
Date:
Subject: Re: BUG #17085: Should be able to create an index without referential checking when ON DELETE NO ACTION
Next
From: PG Bug reporting form
Date:
Subject: BUG #17088: FailedAssertion in prepagg.c