Code

CData: Include CF function in output string.
authorSebastian Harl <sh@tokkee.org>
Tue, 23 Oct 2012 10:34:01 +0000 (12:34 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 23 Oct 2012 10:34:01 +0000 (12:34 +0200)
This makes all information available that are required to regenerate the same
CData object from the stringified version.

src/cdata.c

index 03fefbc6c510f45556c76237472c1139895e7365..26f2656acbb5d544fd644ea1bc5e70d453238401 100644 (file)
@@ -189,8 +189,9 @@ cdata_out(PG_FUNCTION_ARGS)
 
        data = PG_GETARG_CDATA_P(0);
 
-       snprintf(cd_str, sizeof(cd_str), "%g (U:%i/%i)",
-                       data->value, data->undef_num, data->val_num);
+       snprintf(cd_str, sizeof(cd_str), "%g (%s U:%i/%i)",
+                       data->value, CF_TO_STR(data->cf),
+                       data->undef_num, data->val_num);
 
        result = pstrdup(cd_str);
        PG_RETURN_CSTRING(result);