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.
This commit is contained in:
Tom Lane 2014-05-09 09:44:11 -04:00
parent bdf9dd4db7
commit 62e57ff040
1 changed files with 1 additions and 1 deletions

View File

@ -1562,7 +1562,7 @@ add_json(Datum val, bool is_null, StringInfo result, Oid val_type, bool key_scal
tcategory = TYPCATEGORY_ARRAY;
else if (val_type == RECORDOID)
tcategory = TYPCATEGORY_COMPOSITE;
else if (val_type == JSONOID)
else if (val_type == JSONOID || val_type == JSONBOID)
tcategory = TYPCATEGORY_JSON;
else
tcategory = TypeCategory(val_type);