Lists: | pgsql-hackers |
---|
From: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Incorrect comment in postgres_fdw.c |
Date: | 2014-07-11 09:22:04 |
Message-ID: | 53BFACBC.9000503@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
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
Attachment | Content-Type | Size |
---|---|---|
postgres_fdw-comment.patch | text/x-diff | 436 bytes |
From: | Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com> |
---|---|
To: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Incorrect comment in postgres_fdw.c |
Date: | 2014-07-14 10:31:58 |
Message-ID: | CAEZqfEfBpJP+kNBeOuaB-B_euBWHJR_EhXsgST5fmf1dZLLxdg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Fujita-san,
2014-07-11 18:22 GMT+09:00 Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)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().)
+1 for just removing the comment, because header comment clearly
mentions necessity of releasing the PGresult.
--
Shigeru HANADA
From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com> |
Cc: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Incorrect comment in postgres_fdw.c |
Date: | 2014-07-14 10:46:43 |
Message-ID: | CAHGQGwFp3xS3YxKZw1Hr=3XGP7uaJen6mwjZJVn5c30kNt9Z9g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Jul 14, 2014 at 7:31 PM, Shigeru Hanada
<shigeru(dot)hanada(at)gmail(dot)com> wrote:
> Fujita-san,
>
> 2014-07-11 18:22 GMT+09:00 Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)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().)
>
> +1 for just removing the comment, because header comment clearly
> mentions necessity of releasing the PGresult.
Committed. Thanks for the report!
Regards,
--
Fujii Masao
From: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Incorrect comment in postgres_fdw.c |
Date: | 2014-07-15 02:40:09 |
Message-ID: | 53C49489.1090000@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
(2014/07/14 19:46), Fujii Masao wrote:
> On Mon, Jul 14, 2014 at 7:31 PM, Shigeru Hanada
> <shigeru(dot)hanada(at)gmail(dot)com> wrote:
>> Fujita-san,
>>
>> 2014-07-11 18:22 GMT+09:00 Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)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().)
>>
>> +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