mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-11 19:20:40 +08:00
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:
parent
bdf9dd4db7
commit
62e57ff040
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user