ecpg.patch
text/plain
Filename: ecpg.patch
Type: text/plain
Part: 0
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/interfaces/ecpg/ChangeLog | 5 | 0 |
| src/interfaces/ecpg/include/ecpgerrno.h | 1 | 0 |
| src/interfaces/ecpg/lib/ecpglib.c | 14 | 0 |
--- src/interfaces/ecpg/ChangeLog.orig Mon Aug 2 11:14:41 1999
+++ src/interfaces/ecpg/ChangeLog Fri Sep 10 13:34:19 1999
@@ -1,3 +1,8 @@
+Tue Aug 24 15:53:28 MEST 1999
+
+ - made NULL a valid bool value
+ - check for indicator variables on NULL
+
Wed Feb 11 10:58:13 CET 1998
- Added '-d' option to turn on debugging.
--- src/interfaces/ecpg/include/ecpgerrno.h.orig Sat Mar 20 20:46:33 1999
+++ src/interfaces/ecpg/include/ecpgerrno.h Fri Sep 10 13:33:43 1999
@@ -22,6 +22,7 @@
#define ECPG_FLOAT_FORMAT -206
#define ECPG_CONVERT_BOOL -207
#define ECPG_EMPTY -208
+#define ECPG_MISSING_INDICATOR -209
#define ECPG_NO_CONN -220
#define ECPG_NOT_CONN -221
--- src/interfaces/ecpg/lib/ecpglib.c.orig Mon Aug 2 11:14:41 1999
+++ src/interfaces/ecpg/lib/ecpglib.c Fri Sep 10 13:34:12 1999
@@ -755,7 +755,16 @@
case ECPGt_unsigned_long:
((long *) var->ind_value)[act_tuple] = -PQgetisnull(results, act_tuple, act_field);
break;
+ case ECPGt_NO_INDICATOR:
+ if (PQgetisnull(results, act_tuple, act_field))
+ {
+ register_error(ECPG_MISSING_INDICATOR, "NULL value without indicator variable on line %d.", stmt->lineno);
+ status = false;
+ }
+ break;
default:
+ register_error(ECPG_UNSUPPORTED, "Unsupported indicator type %s on line %d.", ECPGtype_name(var->ind_type), stmt->lineno);
+ status = false;
break;
}
@@ -878,6 +887,11 @@
else if (pval[0] == 't' && pval[1] == '\0')
{
((char *) var->value)[act_tuple] = true;
+ break;
+ }
+ else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field))
+ {
+ // NULL is valid
break;
}
}