Typos and wording in jsonpath-exec.c

Started by Daniel Gustafssonover 6 years ago2 messages
#1Daniel Gustafsson
daniel@yesql.se
1 attachment(s)

Spotted two minor typos when skimming through code, and a sentence on
returnvalue which seemed a bit odd since executeJsonPath() can exit on
ereport(). The attached diff fixes the typos and suggests a new wording.

cheers ./daniel

Attachments:

typo-jsonpath_exec.diffapplication/octet-stream; name=typo-jsonpath_exec.diff; x-unix-mode=0644Download
diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c
index ae61b8fa3e..0a263ad8b3 100644
--- a/src/backend/utils/adt/jsonpath_exec.c
+++ b/src/backend/utils/adt/jsonpath_exec.c
@@ -470,9 +470,10 @@ jsonb_path_query_first(FunctionCallInfo fcinfo)
  * 'throwErrors' - whether we should throw suppressible errors
  * 'result' - list to store result items into
  *
- * Returns an error happens during processing or NULL on no error.
+ * Returns an error if a recoverable error happens during processing, or NULL
+ * on no error.
  *
- * Note, jsonb and jsonpath values should be avaliable and untoasted during
+ * Note, jsonb and jsonpath values should be available and untoasted during
  * work because JsonPathItem, JsonbValue and result item could have pointers
  * into input values.  If caller needs to just check if document matches
  * jsonpath, then it doesn't provide a result arg.  In this case executor
@@ -1529,7 +1530,7 @@ executeBinaryArithmExpr(JsonPathExecContext *cxt, JsonPathItem *jsp,
 
 	/*
 	 * XXX: By standard only operands of multiplicative expressions are
-	 * unwrapped.  We extend it to other binary arithmetics expressions too.
+	 * unwrapped.  We extend it to other binary arithmetic expressions too.
 	 */
 	jper = executeItemOptUnwrapResult(cxt, &elem, jb, true, &lseq);
 	if (jperIsError(jper))
#2Magnus Hagander
magnus@hagander.net
In reply to: Daniel Gustafsson (#1)
Re: Typos and wording in jsonpath-exec.c

On Tue, May 7, 2019 at 2:39 PM Daniel Gustafsson <daniel@yesql.se> wrote:

Spotted two minor typos when skimming through code, and a sentence on
returnvalue which seemed a bit odd since executeJsonPath() can exit on
ereport(). The attached diff fixes the typos and suggests a new wording.

Pushed. Thanks!

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;