Update comment about ExprState.escontext
authorAmit Langote <[email protected]>
Fri, 6 Sep 2024 01:12:00 +0000 (10:12 +0900)
committerAmit Langote <[email protected]>
Fri, 6 Sep 2024 01:13:53 +0000 (10:13 +0900)
The updated comment provides more helpful guidance by mentioning that
escontext should be set when soft error handling is needed.

Reported-by: Jian He <[email protected]>
Discussion: https://postgr.es/m/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.com
Back-through: 17

src/include/nodes/execnodes.h

index 627f99c13d1c5d25ac24b6d89f48a799001ac190..516b9487435c45a6ed6663fdb66848bca5846208 100644 (file)
@@ -132,8 +132,10 @@ typedef struct ExprState
    bool       *innermost_domainnull;
 
    /*
-    * For expression nodes that support soft errors.  Should be set to NULL
-    * before calling ExecInitExprRec() if the caller wants errors thrown.
+    * For expression nodes that support soft errors. Should be set to NULL if
+    * the caller wants errors to be thrown. Callers that do not want errors
+    * thrown should set it to a valid ErrorSaveContext before calling
+    * ExecInitExprRec().
     */
    ErrorSaveContext *escontext;
 } ExprState;