git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfc9497)
postgres_fdw: Remove useless if-test in GetConnection().
2023年3月17日 09:15:00 +0000 (18:15 +0900)
2023年3月17日 09:15:00 +0000 (18:15 +0900)
Checking whether entry->conn is NULL after doing disconnect_pg_server()
for that entry is pointless, as that function ensures that it is NULL.

Thinko in commit 7fc1a81e4; this would be harmless, so patch HEAD only.

Reviewed-by: Richard Guo and Daniel Gustafsson
Discussion: https://postgr.es/m/CAPmGK169vQ83PQwQkoxO-AK2EeK1EsgsxixedM%2BBLWEAhZ_AqQ%40mail.gmail.com


diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
index 12b54f15cd6ae849152f5c8d012baf3657d63c93..8eb9194506cdd52394f2fe34792a18979c84a754 100644 (file)
--- a/contrib/postgres_fdw/connection.c
+++ b/contrib/postgres_fdw/connection.c
@@ -271,8 +271,7 @@ GetConnection(UserMapping *user, bool will_prep_stmt, PgFdwConnState **state)
entry->conn);
disconnect_pg_server(entry);
- if (entry->conn == NULL)
- make_new_connection(entry, user);
+ make_new_connection(entry, user);
begin_remote_xact(entry);
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /