jsonpath_exec: fix typo "absense" -> "absence"

Dagfinn Ilmari Mannsåker, reviewed by Shubham Khanna.

Discussion: http://postgr.es/m/87le9fmi01.fsf@wibble.ilmari.org
This commit is contained in:
Robert Haas 2024-01-02 12:27:38 -05:00
parent ff09129bec
commit 5bc7b33b4e
1 changed files with 5 additions and 5 deletions

View File

@ -153,7 +153,7 @@ typedef struct JsonValueListIterator
} JsonValueListIterator; } JsonValueListIterator;
/* strict/lax flags is decomposed into four [un]wrap/error flags */ /* 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 jspAutoUnwrap(cxt) ((cxt)->laxMode)
#define jspAutoWrap(cxt) ((cxt)->laxMode) #define jspAutoWrap(cxt) ((cxt)->laxMode)
#define jspIgnoreStructuralErrors(cxt) ((cxt)->ignoreStructuralErrors) #define jspIgnoreStructuralErrors(cxt) ((cxt)->ignoreStructuralErrors)
@ -570,7 +570,7 @@ executeJsonPath(JsonPath *path, Jsonb *vars, Jsonb *json, bool throwErrors,
cxt.throwErrors = throwErrors; cxt.throwErrors = throwErrors;
cxt.useTz = useTz; 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 * 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: case jpiExists:
jspGetArg(jsp, &larg); jspGetArg(jsp, &larg);
if (jspStrictAbsenseOfErrors(cxt)) if (jspStrictAbsenceOfErrors(cxt))
{ {
/* /*
* In strict mode we must get a complete list of values to * 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 (res == jpbUnknown)
{ {
if (jspStrictAbsenseOfErrors(cxt)) if (jspStrictAbsenceOfErrors(cxt))
return jpbUnknown; return jpbUnknown;
error = true; error = true;
} }
else if (res == jpbTrue) else if (res == jpbTrue)
{ {
if (!jspStrictAbsenseOfErrors(cxt)) if (!jspStrictAbsenceOfErrors(cxt))
return jpbTrue; return jpbTrue;
found = true; found = true;