1.patch
application/octet-stream
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/include/nodes/miscnodes.h | 8 | 1 |
diff --git a/src/include/nodes/miscnodes.h b/src/include/nodes/miscnodes.h
index bbd1a43c3fb..bdebe5d842a 100644
--- a/src/include/nodes/miscnodes.h
+++ b/src/include/nodes/miscnodes.h
@@ -49,9 +49,16 @@ typedef struct ErrorSaveContext
ErrorData *error_data; /* details of error, if so */
} ErrorSaveContext;
+static inline bool
+IsErrorSaveContext(const void *ptr)
+{
+ const ErrorSaveContext *esc = (const ErrorSaveContext *) ptr;
+ return esc->type == T_ErrorSaveContext;
+}
+
/* Often-useful macro for checking if a soft error was reported */
#define SOFT_ERROR_OCCURRED(escontext) \
- ((escontext) != NULL && IsA(escontext, ErrorSaveContext) && \
+ ((escontext) != NULL && IsErrorSaveContext(escontext) && \
((ErrorSaveContext *) (escontext))->error_occurred)
#endif /* MISCNODES_H */