Re: not null constraints, again
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: jian he <jian.universality@gmail.com>,
Pg Hackers <pgsql-hackers@lists.postgresql.org>,
Tender Wang <tndrwang@gmail.com>
Date: 2024-11-08T16:26:11Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > But we'll see what else the buildfarm has to say now that I pushed it ... A lot of the buildfarm is saying adder | 2024-11-08 13:04:39 | ../pgsql/src/backend/catalog/pg_constraint.c:708:37: warning: comparison is always true due to limited range of data type [-Wtype-limits] which evidently is about this: Assert(colnum > 0 && colnum <= MaxAttrNumber); The memcpy right before that doesn't seem like project style either. Most other places that are doing similar things just cast the ARR_DATA_PTR to the right pointer type and dereference it. regards, tom lane
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