Re: [PATCH] hstore_to_json: empty hstores must return empty json objects

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [PATCH] hstore_to_json: empty hstores must return empty json objects
Дата
Msg-id 525FF794.9010405@dunslane.net
обсуждение исходный текст
Ответ на Re: [PATCH] hstore_to_json: empty hstores must return empty json objects  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 10/17/2013 10:23 AM, Alvaro Herrera wrote:
> 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("{}")) ?
>


Yeah. I'm going to fix this this morning.

cheers

andrew



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oskari Saarenmaa
Дата:
Сообщение: Re: [PATCH] hstore_to_json: empty hstores must return empty json objects
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Rework SSL renegotiation code