Oskari Saarenmaa wrote:

> @@ -1241,8 +1241,8 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
>  
>       if (count == 0)
>       {
> -             out = palloc(1);
> -             *out = '\0';
> +             out = palloc(3);
> +             memcpy(out, "{}", 3);
>               PG_RETURN_TEXT_P(cstring_to_text(out));
>       }

Can't you just PG_RETURN_TEXT_P(cstring_to_text("{}")) ?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to