1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Allow empty string object keys in json_object().

This makes the behaviour consistent with the json parser, other
json-generating functions, and the JSON standards.
This commit is contained in:
Andrew Dunstan
2014-07-22 11:22:47 -04:00
parent d7cdf6ee36
commit 4ebe3519e1
4 changed files with 13 additions and 13 deletions

View File

@ -435,7 +435,7 @@ select json_object('{a,b,c,"d e f"}','{1,2,3,"a b c",g}');
select json_object('{a,b,NULL,"d e f"}','{1,2,3,"a b c"}');
-- empty key error
-- empty key is allowed
select json_object('{a,b,"","d e f"}','{1,2,3,"a b c"}');