Size limit of JSON data type in PostgreSQL
Does anyone know what is the limit on the size of JSON data type in PostgreSQL 9.2? Looking at the source for PostgreSQL 9.2.1: Source: postgresql-9.2.1\src\backend\utils\adt\json.c: /* * Input. */ Datum json_in(PG_FUNCTION_ARGS) { char *text = PG_GETARG_CSTRING(0); json_validate_cstring(text); /* Internal representation is the same as text, for now */ PG_RETURN_TEXT_P(cstring_to_text(text)); } Update for PostgreSQL 9.3.5: The code has changed in the json_in function, but the json internal representation is still text: Source: postgresql-9.3.5\src\backend\utils\adt\json.c: /* * Input. */ Datum