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-25T12:10:23Z
Lists: pgsql-hackers
in ATExecSetNotNull
/*
* If we find an appropriate constraint, we're almost done, but just
* need to change some properties on it: if we're recursing, increment
* coninhcount; if not, set conislocal if not already set.
*/
if (recursing)
{
conForm->coninhcount++;
changed = true;
}
else if (!conForm->conislocal)
{
conForm->conislocal = true;
changed = true;
elog(INFO, "constraint islocal attribute changed");
}
if (recursing && !conForm->conislocal)
elog(INFO, "should not happenX");
"should not happenX" appeared in regression.diff, but not
"constraint islocal attribute changed"
Does that mean the IF, ELSE IF logic is not right?
in doc/src/sgml/ref/create_table.sgml
[ NO INHERIT ]
can apply to
<replaceable class="parameter">table_constraint</replaceable>
and
<replaceable class="parameter">column_constraint</replaceable>
so we should change create_table.sgml
accordingly?
Commits
-
Suppress "may be used uninitialized" warnings from older compilers.
- fc5e966f73f0 18.0 landed
-
Elide not-null constraint checks on child tables during PK creation
- 11ff192b5bb7 18.0 landed
-
Remove unnecessary code to handle CONSTR_NOTNULL
- 5b291d1c9c09 18.0 landed
-
Silence compilers about extractNotNullColumn()
- ff239c3bf4e8 18.0 landed
-
Add pg_constraint rows for not-null constraints
- 14e87ffa5c54 18.0 landed