Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4 from shartte/emptyArrays

Empty PostgreSQL arrays will now be created for empty JSON arrays. Thanks to shartte.
  • Loading branch information...
commit 18cf134aea7b8cef1a4196eb1f68606cc30ab623 2 parents bbe0b27 + e6a4820
@theirix authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/json_accessors.c
View
4 src/json_accessors.c
@@ -310,6 +310,10 @@ Datum json_array_to_array_generic_impl(cJSON *jsonArray, int json_type, Oid elem
pfree(items);
}
+ else
+ {
+ array = construct_empty_array(elem_oid);
+ }
if (!array)
ereport(ERROR,
Please sign in to comment.
Something went wrong with that request. Please try again.