detoast.patch
text/x-patch
Filename: detoast.patch
Type: text/x-patch
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: context
| File | + | − |
|---|---|---|
| src/pl/plpgsql/src/pl_exec.c | 13 | 0 |
*** ./src/pl/plpgsql/src/pl_exec.c.orig 2011-01-16 14:18:59.000000000 +0100
--- ./src/pl/plpgsql/src/pl_exec.c 2011-01-22 11:27:06.539626447 +0100
***************
*** 255,260 ****
--- 255,273 ----
var->value = fcinfo->arg[i];
var->isnull = fcinfo->argnull[i];
var->freeval = false;
+
+ /* Detoast call arguments early */
+ if (!var->isnull && !var->datatype->typbyval && var->datatype->typlen == -1)
+ {
+ Datum value;
+
+ value = PointerGetDatum(PG_DETOAST_DATUM(var->value));
+ if (value != var->value)
+ {
+ var->value = value;
+ var->freeval = true;
+ }
+ }
}
break;