postgres_fdw: Useless if-test in GetConnection()

Поиск
Список
Период
Сортировка
От Etsuro Fujita
Тема postgres_fdw: Useless if-test in GetConnection()
Дата
Msg-id CAPmGK169vQ83PQwQkoxO-AK2EeK1EsgsxixedM+BLWEAhZ_AqQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: postgres_fdw: Useless if-test in GetConnection()  (Richard Guo <guofenglinux@gmail.com>)
Re: postgres_fdw: Useless if-test in GetConnection()  (Daniel Gustafsson <daniel@yesql.se>)
Re: postgres_fdw: Useless if-test in GetConnection()  (Etsuro Fujita <etsuro.fujita@gmail.com>)
Список pgsql-hackers
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 a patch for that.  I think we could instead add an
assertion, but I did not, because we already have it in
make_new_connection().

This would be harmless, so I am planning to apply the patch to HEAD only.

Best regards,
Etsuro Fujita

Вложения

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

Предыдущее
От: Melih Mutlu
Дата:
Сообщение: Re: Allow logical replication to copy tables in binary format
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: TAP output format in pg_regress