Re: postgres_fdw: Useless if-test in GetConnection()

2023-03-17 Thread Etsuro Fujita
On Wed, Mar 15, 2023 at 7:18 PM Etsuro Fujita wrote: > This would be harmless, so I am planning to apply the patch to HEAD only. I forgot to mention that this was added in v14. Done that way. Best regards, Etsuro Fujita

Re: postgres_fdw: Useless if-test in GetConnection()

2023-03-16 Thread Etsuro Fujita
On Wed, Mar 15, 2023 at 7:58 PM Daniel Gustafsson wrote: > > On 15 Mar 2023, at 11:18, Etsuro Fujita wrote: > > While working on something else, I noticed that the “if (entry->conn > > == NULL)” test after doing disconnect_pg_server() when re-establishing > > a given connection in

Re: postgres_fdw: Useless if-test in GetConnection()

2023-03-16 Thread Etsuro Fujita
On Wed, Mar 15, 2023 at 7:40 PM Richard Guo wrote: > On Wed, Mar 15, 2023 at 6:18 PM Etsuro Fujita wrote: >> While working on something else, I noticed that the “if (entry->conn >> == NULL)” test after doing disconnect_pg_server() when re-establishing >> a given connection in GetConnection() is

Re: postgres_fdw: Useless if-test in GetConnection()

2023-03-15 Thread Daniel Gustafsson
> On 15 Mar 2023, at 11:18, Etsuro Fujita wrote: > While working on something else, I noticed that the “if (entry->conn > == NULL)” test after doing disconnect_pg_server() when re-establishing > a given connection in GetConnection() is pointless, because the former > function ensures that

Re: postgres_fdw: Useless if-test in GetConnection()

2023-03-15 Thread Richard Guo
On Wed, Mar 15, 2023 at 6:18 PM Etsuro Fujita wrote: > While working on something else, I noticed that the “if (entry->conn > == NULL)” test after doing disconnect_pg_server() when re-establishing > a given connection in GetConnection() is pointless, because the former > function ensures that

postgres_fdw: Useless if-test in GetConnection()

2023-03-15 Thread Etsuro Fujita
Hi, While working on something else, I noticed that the “if (entry->conn == NULL)” test after doing disconnect_pg_server() when re-establishing a given connection in GetConnection() is pointless, because the former function ensures that entry->conn is NULL. So I removed the if-test. Attached is