diff options
author | Pavan Deolasee | 2017-06-14 05:42:18 +0000 |
---|---|---|
committer | Pavan Deolasee | 2017-06-14 05:42:18 +0000 |
commit | 15dd5274c323fb93e4e3ea9ad2185aaaec10f79c (patch) | |
tree | 9dafb4c7f735d9429ea461dc792933af87493c33 /src/backend/utils/adt/jsonb.c | |
parent | dfbb88e3bbb526dcb204b456b9e5cfd9d10d0d0a (diff) | |
parent | d5cb3bab564e0927ffac7c8729eacf181a12dd40 (diff) |
Merge from PG master upto d5cb3bab564e0927ffac7c8729eacf181a12dd40
This is the result of the "git merge remotes/PGSQL/master" upto the said commit
point. We have done some basic analysis, fixed compilation problems etc, but
bulk of the logical problems in conflict resolution etc will be handled by
subsequent commits.
Diffstat (limited to 'src/backend/utils/adt/jsonb.c')
-rw-r--r-- | src/backend/utils/adt/jsonb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c index 002aa4946a..1dabfa9fc1 100644 --- a/src/backend/utils/adt/jsonb.c +++ b/src/backend/utils/adt/jsonb.c @@ -3,7 +3,7 @@ * jsonb.c * I/O routines for jsonb type * - * Copyright (c) 2014-2016, PostgreSQL Global Development Group + * Copyright (c) 2014-2017, PostgreSQL Global Development Group * * IDENTIFICATION * src/backend/utils/adt/jsonb.c @@ -644,9 +644,10 @@ jsonb_categorize_type(Oid typoid, default: /* Check for arrays and composites */ - if (OidIsValid(get_element_type(typoid))) + if (OidIsValid(get_element_type(typoid)) || typoid == ANYARRAYOID + || typoid == RECORDARRAYOID) *tcategory = JSONBTYPE_ARRAY; - else if (type_is_rowtype(typoid)) + else if (type_is_rowtype(typoid)) /* includes RECORDOID */ *tcategory = JSONBTYPE_COMPOSITE; else { @@ -856,7 +857,7 @@ datum_to_jsonb(Datum val, bool is_null, JsonbInState *result, /* parse the json right into the existing result object */ JsonLexContext *lex; JsonSemAction sem; - text *json = DatumGetTextP(val); + text *json = DatumGetTextPP(val); lex = makeJsonLexContext(json, true); |