Incorrect comment in postgres_fdw.c

Поиск
Список
Период
Сортировка
Искать

Incorrect comment in postgres_fdw.c

От:
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Дата:
Вложения:
I think the following comment for store_returning_result() in
postgres_fdw.c is not right.

    /* PGresult must be released before leaving this function. */

I think PGresult should not be released before leaving this function *on
success* in that function.

(I guess the comment has been copied and pasted from that for
get_remote_estimate().)

Thanks,

Best regards,
Etsuro Fujita

Re: Incorrect comment in postgres_fdw.c

От:
Shigeru Hanada <shigeru.hanada@gmail.com>
Дата:
Fujita-san,

2014-07-11 18:22 GMT+09:00 Etsuro Fujita :
> I think the following comment for store_returning_result() in
> postgres_fdw.c is not right.
>
>     /* PGresult must be released before leaving this function. */
>
> I think PGresult should not be released before leaving this function *on
> success* in that function.
>
> (I guess the comment has been copied and pasted from that for
> get_remote_estimate().)

+1 for just removing the comment, because header comment clearly
mentions necessity of releasing the PGresult.


-- 
Shigeru HANADA


Re: Incorrect comment in postgres_fdw.c

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Mon, Jul 14, 2014 at 7:31 PM, Shigeru Hanada
 wrote:
> Fujita-san,
>
> 2014-07-11 18:22 GMT+09:00 Etsuro Fujita :
>> I think the following comment for store_returning_result() in
>> postgres_fdw.c is not right.
>>
>>     /* PGresult must be released before leaving this function. */
>>
>> I think PGresult should not be released before leaving this function *on
>> success* in that function.
>>
>> (I guess the comment has been copied and pasted from that for
>> get_remote_estimate().)
>
> +1 for just removing the comment, because header comment clearly
> mentions necessity of releasing the PGresult.

Committed. Thanks for the report!

Regards,

-- 
Fujii Masao


Re: Incorrect comment in postgres_fdw.c

От:
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Дата:
(2014/07/14 19:46), Fujii Masao wrote:
> On Mon, Jul 14, 2014 at 7:31 PM, Shigeru Hanada
>  wrote:
>> Fujita-san,
>>
>> 2014-07-11 18:22 GMT+09:00 Etsuro Fujita :
>>> I think the following comment for store_returning_result() in
>>> postgres_fdw.c is not right.
>>>
>>>      /* PGresult must be released before leaving this function. */
>>>
>>> I think PGresult should not be released before leaving this function *on
>>> success* in that function.
>>>
>>> (I guess the comment has been copied and pasted from that for
>>> get_remote_estimate().)
>>
>> +1 for just removing the comment, because header comment clearly
>> mentions necessity of releasing the PGresult.
>
> Committed. Thanks for the report!

Thank you for committing the patch!  And thanks, Hanada-san!

Best regards,
Etsuro Fujita


FAQ