agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
[PATCH 2/3] Comment typos: extended stats a4d75c86b and 518442c7f
2+ messages / 2 participants
[nested] [flat]

* [PATCH 2/3] Comment typos: extended stats a4d75c86b and 518442c7f
@ 2021-04-27 12:57  Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Justin Pryzby @ 2021-04-27 12:57 UTC (permalink / raw)

---
 src/backend/parser/parse_utilcmd.c      | 2 +-
 src/backend/statistics/extended_stats.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 9dd30370da..eb9e63f4a8 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -1943,7 +1943,7 @@ generateClonedExtStatsStmt(RangeVar *heapRel, Oid heapRelid,
 	 * simply append them after simple column references.
 	 *
 	 * XXX Some places during build/estimation treat expressions as if they
-	 * are before atttibutes, but for the CREATE command that's entirely
+	 * are before attributes, but for the CREATE command that's entirely
 	 * irrelevant.
 	 */
 	datum = SysCacheGetAttr(STATEXTOID, ht_stats,
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 7e11cb9d5f..5e53783ea6 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1796,7 +1796,7 @@ statext_mcv_clauselist_selectivity(PlannerInfo *root, List *clauses, int varReli
 				continue;
 
 			/*
-			 * Now we know the clause is compatible (we have either atttnums
+			 * Now we know the clause is compatible (we have either attnums
 			 * or expressions extracted from it), and was not estimated yet.
 			 */
 
-- 
2.17.0


--aX6oBa4COn3eIhlv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="0003-Mention-statistics-objects.patch"



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* [PATCH v1] Fix optind handling inconsistency in getopt_long() for missing argument
@ 2026-07-21 09:49  Japin Li <japinli@hotmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Japin Li @ 2026-07-21 09:49 UTC (permalink / raw)

Move optind++ and place = EMSG before the BADARG return in the long option
path to match short option behavior and ensure consistent state.
---
 src/port/getopt_long.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/port/getopt_long.c b/src/port/getopt_long.c
index 20953db9db1..a488a647889 100644
--- a/src/port/getopt_long.c
+++ b/src/port/getopt_long.c
@@ -145,6 +145,9 @@ retry:
 						}
 						else
 						{
+							place = EMSG;
+							optind++;
+
 							if (optstring[0] == ':')
 								return BADARG;
 
@@ -153,9 +156,6 @@ retry:
 										"%s: option requires an argument -- %s\n",
 										argv[0], place);
 
-							place = EMSG;
-							optind++;
-
 							if (has_arg == required_argument)
 								return BADCH;
 							optarg = NULL;
-- 
2.53.0


--=-=-=--






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-07-21 09:49 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 12:57 [PATCH 2/3] Comment typos: extended stats a4d75c86b and 518442c7f Justin Pryzby <pryzbyj@telsasoft.com>
2026-07-21 09:49 [PATCH v1] Fix optind handling inconsistency in getopt_long() for missing argument Japin Li <japinli@hotmail.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox