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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Victor Porton <porton(dot)victor(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17085: Should be able to create an index without referential checking when ON DELETE NO ACTION
Date: 2021-07-07 00:43:23
Message-ID: CAKFQuwatZQkAFOBDHmiwLeKvHawLTtx5jUX-wRXGW863efgMJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jul 6, 2021 at 5:33 PM Victor Porton <porton(dot)victor(at)gmail(dot)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.

In response to

Browse pgsql-bugs by date

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