jsonpath_exec: fix typo "absense" -> "absence"
authorRobert Haas <[email protected]>
Tue, 2 Jan 2024 17:27:38 +0000 (12:27 -0500)
committerRobert Haas <[email protected]>
Tue, 2 Jan 2024 17:27:38 +0000 (12:27 -0500)
Dagfinn Ilmari MannsÃ¥ker, reviewed by Shubham Khanna.

Discussion: http://postgr.es/m/[email protected]

src/backend/utils/adt/jsonpath_exec.c

index 2d0599b4aaae3fc8899725edf4c602986812b220..9a09604f6423004900e49ea16376b6d5161dba10 100644 (file)
@@ -153,7 +153,7 @@ typedef struct JsonValueListIterator
 } JsonValueListIterator;
 
 /* strict/lax flags is decomposed into four [un]wrap/error flags */
-#define jspStrictAbsenseOfErrors(cxt)  (!(cxt)->laxMode)
+#define jspStrictAbsenceOfErrors(cxt)  (!(cxt)->laxMode)
 #define jspAutoUnwrap(cxt)             ((cxt)->laxMode)
 #define jspAutoWrap(cxt)               ((cxt)->laxMode)
 #define jspIgnoreStructuralErrors(cxt) ((cxt)->ignoreStructuralErrors)
@@ -570,7 +570,7 @@ executeJsonPath(JsonPath *path, Jsonb *vars, Jsonb *json, bool throwErrors,
    cxt.throwErrors = throwErrors;
    cxt.useTz = useTz;
 
-   if (jspStrictAbsenseOfErrors(&cxt) && !result)
+   if (jspStrictAbsenceOfErrors(&cxt) && !result)
    {
        /*
         * In strict mode we must get a complete list of values to check that
@@ -1318,7 +1318,7 @@ executeBoolItem(JsonPathExecContext *cxt, JsonPathItem *jsp,
        case jpiExists:
            jspGetArg(jsp, &larg);
 
-           if (jspStrictAbsenseOfErrors(cxt))
+           if (jspStrictAbsenceOfErrors(cxt))
            {
                /*
                 * In strict mode we must get a complete list of values to
@@ -1516,14 +1516,14 @@ executePredicate(JsonPathExecContext *cxt, JsonPathItem *pred,
 
            if (res == jpbUnknown)
            {
-               if (jspStrictAbsenseOfErrors(cxt))
+               if (jspStrictAbsenceOfErrors(cxt))
                    return jpbUnknown;
 
                error = true;
            }
            else if (res == jpbTrue)
            {
-               if (!jspStrictAbsenseOfErrors(cxt))
+               if (!jspStrictAbsenceOfErrors(cxt))
                    return jpbTrue;
 
                found = true;