Commit 62e57ff0 authored by Tom Lane's avatar Tom Lane

Teach add_json() that jsonb is of TYPCATEGORY_JSON.

This code really needs to be refactored so that there aren't so many copies
that can diverge.  Not to mention that this whole approach is probably
wrong.  But for the moment I'll just stick my finger in the dike.
Per report from Michael Paquier.
parent bdf9dd4d
...@@ -1562,7 +1562,7 @@ add_json(Datum val, bool is_null, StringInfo result, Oid val_type, bool key_scal ...@@ -1562,7 +1562,7 @@ add_json(Datum val, bool is_null, StringInfo result, Oid val_type, bool key_scal
tcategory = TYPCATEGORY_ARRAY; tcategory = TYPCATEGORY_ARRAY;
else if (val_type == RECORDOID) else if (val_type == RECORDOID)
tcategory = TYPCATEGORY_COMPOSITE; tcategory = TYPCATEGORY_COMPOSITE;
else if (val_type == JSONOID) else if (val_type == JSONOID || val_type == JSONBOID)
tcategory = TYPCATEGORY_JSON; tcategory = TYPCATEGORY_JSON;
else else
tcategory = TypeCategory(val_type); tcategory = TypeCategory(val_type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment