On 3/13/17 15:58, Tom Lane wrote: > In the same vein, I think this bit in dblink_open is pretty poor coding > practice: > > if (!rconn || !rconn->conn) > dblink_conn_not_avail(conname); > else > conn = rconn->conn; > > as it expects both the compiler and the reader to understand that > we will not proceed without "conn" getting a value. I see that > that was band-aided around by initializing conn to NULL, but that's a > crummy way of suppressing uninitialized-variable warnings, because it > will mask even actual errors. Far better would be to remove the dummy > initialization and write > > if (!rconn || !rconn->conn) > dblink_conn_not_avail(conname); > conn = rconn->conn;
fixed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers