Re: using index or check in ALTER TABLE SET NOT NULL - Mailing list pgsql-hackers

From Robert Haas
Subject Re: using index or check in ALTER TABLE SET NOT NULL
Date
Msg-id CA+TgmoahVfu0dUmvM1bO3csn=DtFp1fG92995rjYD9u_kO-Y1g@mail.gmail.com
Whole thread Raw
In response to Re: using index or check in ALTER TABLE SET NOT NULL  (Sergei Kornilov <sk@zsrv.org>)
Responses Re: using index or check in ALTER TABLE SET NOT NULL
List pgsql-hackers
On Wed, Nov 29, 2017 at 11:53 AM, Sergei Kornilov <sk@zsrv.org> wrote:
> Here is new patch with check only existed valid constraints and without SPI at all.

Please use pgindent or anyway try to follow project style.  { needs to
go on a line by itself, for example.

isSetNotNullNeedsTableScan seems different than other similarly-named
functions we have.  NotNullImpliedByRelConstraints?

It also lacks a header comment.

Having both PartConstraintImpliedByRelConstraint and
ConstraintImpliedByRelConstraint with identical implementations
doesn't seem like a good idea to me.  I guess just renaming it is
probably fine.

The comment /* T if we added new NOT NULL constraints */ should
probably be changed to /* T if we should recheck NOT NULL constraints
*/ or similar.

I'd suggest registering this with the next CommitFest.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [HACKERS] SQL procedures
Next
From: Raúl Marín Rodríguez
Date:
Subject: Re: [HACKERS] pow support for pgbench