postgres_fdw: Useless test in pgfdw_exec_cleanup_query_end()

Started by Etsuro Fujitaabout 2 years ago2 messageshackers
Jump to latest
#1Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp

Another thing I noticed while working on [1]/messages/by-id/CAPmGK15DF6EE7O6hTLbe5-fHvPDwEx9vm-BOCN3dsKOjZCo7bw@mail.gmail.com is $SUBJECT: this
function checks whether the given query string is non-NULL or not when
creating a WARNING message, but the function is always called with the
query string set, so it should be non-NULL. I removed the check and
instead added an assertion ensuring that the query string is non-NULL.
(I added the assertion to pgfdw_exec_cleanup_query_begin() as well.)
Attached is a patch for that.

If there are no objections, I will apply the patch to HEAD only.

Best regards,
Etsuro Fujita

[1]: /messages/by-id/CAPmGK15DF6EE7O6hTLbe5-fHvPDwEx9vm-BOCN3dsKOjZCo7bw@mail.gmail.com

Attachments:

remove-useless-test-in-pgfdw_exec_cleanup_query_end.patchapplication/octet-stream; name=remove-useless-test-in-pgfdw_exec_cleanup_query_end.patchDownload+5-1
#2Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
In reply to: Etsuro Fujita (#1)
Re: postgres_fdw: Useless test in pgfdw_exec_cleanup_query_end()

On Fri, Mar 22, 2024 at 9:30 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:

If there are no objections, I will apply the patch to HEAD only.

Done.

Best regards,
Etsuro Fujita