Commit e59b74a3 authored by Peter Eisentraut's avatar Peter Eisentraut

dblink: Small code rearrangement for clarity

suggested by Tom Lane
parent afd79873
......@@ -360,7 +360,7 @@ Datum
dblink_open(PG_FUNCTION_ARGS)
{
PGresult *res = NULL;
PGconn *conn = NULL;
PGconn *conn;
char *curname = NULL;
char *sql = NULL;
char *conname = NULL;
......@@ -408,7 +408,7 @@ dblink_open(PG_FUNCTION_ARGS)
if (!rconn || !rconn->conn)
dblink_conn_not_avail(conname);
else
conn = rconn->conn;
/* If we are not in a transaction, start one */
......@@ -451,7 +451,7 @@ PG_FUNCTION_INFO_V1(dblink_close);
Datum
dblink_close(PG_FUNCTION_ARGS)
{
PGconn *conn = NULL;
PGconn *conn;
PGresult *res = NULL;
char *curname = NULL;
char *conname = NULL;
......@@ -495,7 +495,7 @@ dblink_close(PG_FUNCTION_ARGS)
if (!rconn || !rconn->conn)
dblink_conn_not_avail(conname);
else
conn = rconn->conn;
appendStringInfo(&buf, "CLOSE %s", curname);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment