mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
Return valid json when converting an empty hstore.
Oskari Saarenmaa.
This commit is contained in:
parent
86029b31e5
commit
bbe4deac1b
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user