aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-04-17 16:47:04 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-04-17 16:47:04 -0400
commitfc5e966f73f06ab2b3e7fa488fc2712d77639947 (patch)
tree8d14dd32025f46dc13b088c93a69b24a926c6165 /src
parent4aad2cb7707dfb239eaaad29a8a7155027d8e8b8 (diff)
downloadpostgresql-fc5e966f73f06ab2b3e7fa488fc2712d77639947.tar.gz
postgresql-fc5e966f73f06ab2b3e7fa488fc2712d77639947.zip
Suppress "may be used uninitialized" warnings from older compilers.
The "children" list won't be used until "got_children" has been set true, but older compilers don't get that; about half a dozen buildfarm animals are warning about this. Issue added by 11ff192b5. While here, improve slightly-shaky grammar in comment. Discussion: https://postgr.es/m/2057835.1744833309@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/tablecmds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index f971f6019ca..80f689bbbc5 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -9444,9 +9444,9 @@ ATExecDropColumn(List **wqueue, Relation rel, const char *colName,
*
* The not-null constraints for a primary key must cover the whole inheritance
* hierarchy (failing to ensure that leads to funny corner cases). For the
- * normal case where we're asked to recurse, this routine ensures that the
- * not-null constraints either exist already, or queues a requirement for them
- * to be created by phase 2.
+ * normal case where we're asked to recurse, this routine checks if the
+ * not-null constraints exist already, and if not queues a requirement for
+ * them to be created by phase 2.
*
* For the case where we're asked not to recurse, we verify that a not-null
* constraint exists on each column of each (direct) child table, throwing an
@@ -9466,7 +9466,7 @@ ATPrepAddPrimaryKey(List **wqueue, Relation rel, AlterTableCmd *cmd,
AlterTableUtilityContext *context)
{
Constraint *pkconstr;
- List *children;
+ List *children = NIL;
bool got_children = false;
pkconstr = castNode(Constraint, cmd->def);