aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-05-09 09:44:11 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-05-09 09:44:11 -0400
commit62e57ff040e5d0acd303b94e86fff689effc5957 (patch)
tree7c3381bc2c5bdf7cfe2535b8d1e202e1a61c8797 /src/backend/utils/adt/json.c
parentbdf9dd4db78a5f23e863f2d4d8500969dc261fd0 (diff)
downloadpostgresql-62e57ff040e5d0acd303b94e86fff689effc5957.tar.gz
postgresql-62e57ff040e5d0acd303b94e86fff689effc5957.zip
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.
Diffstat (limited to 'src/backend/utils/adt/json.c')
-rw-r--r--src/backend/utils/adt/json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c
index e2db24520eb..22ef4026b7e 100644
--- a/src/backend/utils/adt/json.c
+++ b/src/backend/utils/adt/json.c
@@ -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);