From 00f2d7f61e5ec50f33366fe63015b2edfbf71f8a Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Wed, 8 May 2024 13:28:01 +0200
Subject: [PATCH 3/6] pgindent run

---
 src/bin/pg_dump/pg_dump.c | 58 ++++++++++++++++++---------------------
 1 file changed, 27 insertions(+), 31 deletions(-)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 1d8b137814..739b16516f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -9310,37 +9310,33 @@ determineNotNullFlags(Archive *fout, PGresult *res, int r,
 	i_notnull_inh = PQfnumber(res, "notnull_inh");
 
 	/*
-	 * Not-null constraints require a jumping through a few hoops.
-	 * First, if the user has specified a constraint name that's not
-	 * the system-assigned default name, then we need to preserve
-	 * that. But if they haven't, then we don't want to use the
-	 * verbose syntax in the dump output. (Also, in versions prior to
-	 * 17, there was no constraint name at all.)
+	 * Not-null constraints require a jumping through a few hoops. First, if
+	 * the user has specified a constraint name that's not the system-assigned
+	 * default name, then we need to preserve that. But if they haven't, then
+	 * we don't want to use the verbose syntax in the dump output. (Also, in
+	 * versions prior to 17, there was no constraint name at all.)
 	 *
-	 * (XXX Comparing the name this way to a supposed default name is
-	 * a bit of a hack, but it beats having to store a boolean flag in
-	 * pg_constraint just for this, or having to compute the knowledge
-	 * at pg_dump time from the server.)
+	 * (XXX Comparing the name this way to a supposed default name is a bit of
+	 * a hack, but it beats having to store a boolean flag in pg_constraint
+	 * just for this, or having to compute the knowledge at pg_dump time from
+	 * the server.)
 	 *
-	 * We also need to know if a column is part of the primary key. In
-	 * that case, we want to mark the column as not-null at table
-	 * creation time, so that the table doesn't have to be scanned to
-	 * check for nulls when the PK is created afterwards; this is
-	 * especially critical during pg_upgrade (where the data would not
-	 * be scanned at all otherwise.)  If the column is part of the PK
-	 * and does not have any other not-null constraint, then we
-	 * fabricate a throwaway constraint name that we later use to
-	 * remove the constraint after the PK has been created.
+	 * We also need to know if a column is part of the primary key. In that
+	 * case, we want to mark the column as not-null at table creation time, so
+	 * that the table doesn't have to be scanned to check for nulls when the
+	 * PK is created afterwards; this is especially critical during pg_upgrade
+	 * (where the data would not be scanned at all otherwise.)  If the column
+	 * is part of the PK and does not have any other not-null constraint, then
+	 * we fabricate a throwaway constraint name that we later use to remove
+	 * the constraint after the PK has been created.
 	 *
-	 * For inheritance child tables, we don't want to print not-null
-	 * when the constraint was defined at the parent level instead of
-	 * locally.
+	 * For inheritance child tables, we don't want to print not-null when the
+	 * constraint was defined at the parent level instead of locally.
 	 */
 
 	/*
 	 * We use notnull_inh to suppress unwanted not-null constraints in
-	 * inheritance children, when said constraints come from the
-	 * parent(s).
+	 * inheritance children, when said constraints come from the parent(s).
 	 */
 	tbinfo->notnull_inh[j] = PQgetvalue(res, r, i_notnull_inh)[0] == 't';
 
@@ -9360,9 +9356,9 @@ determineNotNullFlags(Archive *fout, PGresult *res, int r,
 		else if (PQgetvalue(res, r, i_notnull_is_pk)[0] == 't')
 		{
 			/*
-			 * We want this flag to be set for columns of a primary
-			 * key in which data is going to be loaded by the dump we
-			 * produce; thus a partitioned table doesn't need it.
+			 * We want this flag to be set for columns of a primary key in
+			 * which data is going to be loaded by the dump we produce; thus a
+			 * partitioned table doesn't need it.
 			 */
 			if (tbinfo->relkind != RELKIND_PARTITIONED_TABLE)
 				use_throwaway_notnull = true;
@@ -9375,8 +9371,8 @@ determineNotNullFlags(Archive *fout, PGresult *res, int r,
 		if (!PQgetisnull(res, r, i_notnull_name))
 		{
 			/*
-			 * In binary upgrade of inheritance child tables, must
-			 * have a constraint name that we can UPDATE later.
+			 * In binary upgrade of inheritance child tables, must have a
+			 * constraint name that we can UPDATE later.
 			 */
 			if (dopt->binary_upgrade &&
 				!tbinfo->ispartition &&
@@ -9439,8 +9435,8 @@ determineNotNullFlags(Archive *fout, PGresult *res, int r,
 	}
 
 	/*
-	 * Throwaway constraints must always be NO INHERIT; otherwise do
-	 * what the catalog says.
+	 * Throwaway constraints must always be NO INHERIT; otherwise do what the
+	 * catalog says.
 	 */
 	tbinfo->notnull_noinh[j] = use_throwaway_notnull ||
 		PQgetvalue(res, r, i_notnull_noinherit)[0] == 't';
-- 
2.39.2

