projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41b46ed
)
Return valid json when converting an empty hstore.
author
Andrew Dunstan
<andrew@dunslane.net>
Thu, 17 Oct 2013 15:09:55 +0000
(11:09 -0400)
committer
Andrew Dunstan
<andrew@dunslane.net>
Thu, 17 Oct 2013 15:09:55 +0000
(11:09 -0400)
Oskari Saarenmaa.
contrib/hstore/hstore_io.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/hstore/hstore_io.c
b/contrib/hstore/hstore_io.c
index d3e67dd5d021905ecec88929a9e79113dda39bba..772a5ca5d51380a1ecbffffdfbdc48e20acd6ea3 100644
(file)
--- a/
contrib/hstore/hstore_io.c
+++ b/
contrib/hstore/hstore_io.c
@@
-1240,11
+1240,7
@@
hstore_to_json_loose(PG_FUNCTION_ARGS)
dst;
if (count == 0)
- {
- out = palloc(1);
- *out = '\0';
- PG_RETURN_TEXT_P(cstring_to_text(out));
- }
+ PG_RETURN_TEXT_P(cstring_to_text_with_len("{}",2));
buflen = 3;
@@
-1369,11
+1365,7
@@
hstore_to_json(PG_FUNCTION_ARGS)
dst;
if (count == 0)
- {
- out = palloc(1);
- *out = '\0';
- PG_RETURN_TEXT_P(cstring_to_text(out));
- }
+ PG_RETURN_TEXT_P(cstring_to_text_with_len("{}",2));
buflen = 3;