Re: not null constraints, again

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tender Wang <tndrwang@gmail.com>, Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-26T07:41:05Z
Lists: pgsql-hackers

Attachments

Please check the attached minor doc changes.
make the create_foreign_table.sgml, alter_foreign_table.sgml
not-null description
consistent with normal tables.

change
doc/src/sgml/ref/create_table.sgml
Parameters section
from
<term><literal>NOT NULL </literal></term>
to
<term><literal>NOT NULL [ NO INHERIT ] </literal></term>.



in doc/src/sgml/ref/alter_table.sgml
    Adding a constraint recurses only for <literal>CHECK</literal> constraints
    that are not marked <literal>NO INHERIT</literal>.

This sentence needs to be rephrased to:
    Adding a constraint recurses for <literal>CHECK</literal> and
<literal>NOT NULL </literal> constraints
    that are not marked <literal>NO INHERIT</literal>.

Commits

  1. Suppress "may be used uninitialized" warnings from older compilers.

  2. Elide not-null constraint checks on child tables during PK creation

  3. Remove unnecessary code to handle CONSTR_NOTNULL

  4. Silence compilers about extractNotNullColumn()

  5. Add pg_constraint rows for not-null constraints