aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/json.h
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2014-09-11 21:23:51 -0400
committerStephen Frost <sfrost@snowman.net>2014-09-11 21:23:51 -0400
commit95d737ff45a38809130a2c633d9e6bc26c825036 (patch)
treed3d2c052b1def80edd36fa9751a793eca4a3e0e0 /src/include/utils/json.h
parentc3c75fcd7a03067d87b830e98e3698b683446762 (diff)
downloadpostgresql-95d737ff45a38809130a2c633d9e6bc26c825036.tar.gz
postgresql-95d737ff45a38809130a2c633d9e6bc26c825036.zip
Add 'ignore_nulls' option to row_to_json
Provide an option to skip NULL values in a row when generating a JSON object from that row with row_to_json. This can reduce the size of the JSON object in cases where columns are NULL without really reducing the information in the JSON object. This also makes row_to_json into a single function with default values, rather than having multiple functions. In passing, change array_to_json to also be a single function with default values (we don't add an 'ignore_nulls' option yet- it's not clear that there is a sensible use-case there, and it hasn't been asked for in any case). Pavel Stehule
Diffstat (limited to 'src/include/utils/json.h')
-rw-r--r--src/include/utils/json.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/include/utils/json.h b/src/include/utils/json.h
index 82cc48b7113..9d8a0a55a88 100644
--- a/src/include/utils/json.h
+++ b/src/include/utils/json.h
@@ -23,9 +23,7 @@ extern Datum json_out(PG_FUNCTION_ARGS);
extern Datum json_recv(PG_FUNCTION_ARGS);
extern Datum json_send(PG_FUNCTION_ARGS);
extern Datum array_to_json(PG_FUNCTION_ARGS);
-extern Datum array_to_json_pretty(PG_FUNCTION_ARGS);
extern Datum row_to_json(PG_FUNCTION_ARGS);
-extern Datum row_to_json_pretty(PG_FUNCTION_ARGS);
extern Datum to_json(PG_FUNCTION_ARGS);
extern Datum json_agg_transfn(PG_FUNCTION_ARGS);