@@ -116,13 +116,15 @@ typedef struct remoteConnHashEnt
116
116
var_ = NULL; \
117
117
} \
118
118
} while (0)
119
+
119
120
#define DBLINK_RES_INTERNALERROR (p2 ) \
120
121
do { \
121
122
msg = pstrdup(PQerrorMessage(conn)); \
122
123
if (res) \
123
124
PQclear(res); \
124
125
elog(ERROR, "%s: %s", p2, msg); \
125
126
} while (0)
127
+
126
128
#define DBLINK_RES_ERROR (p2 ) \
127
129
do { \
128
130
msg = pstrdup(PQerrorMessage(conn)); \
@@ -133,6 +135,7 @@ typedef struct remoteConnHashEnt
133
135
errmsg("%s", p2), \
134
136
errdetail("%s", msg))); \
135
137
} while (0)
138
+
136
139
#define DBLINK_RES_ERROR_AS_NOTICE (p2 ) \
137
140
do { \
138
141
msg = pstrdup(PQerrorMessage(conn)); \
@@ -143,6 +146,7 @@ typedef struct remoteConnHashEnt
143
146
errmsg("%s", p2), \
144
147
errdetail("%s", msg))); \
145
148
} while (0)
149
+
146
150
#define DBLINK_CONN_NOT_AVAIL \
147
151
do { \
148
152
if(conname) \
@@ -154,6 +158,7 @@ typedef struct remoteConnHashEnt
154
158
(errcode(ERRCODE_CONNECTION_DOES_NOT_EXIST), \
155
159
errmsg("connection not available"))); \
156
160
} while (0)
161
+
157
162
#define DBLINK_GET_CONN \
158
163
do { \
159
164
char *conname_or_str = GET_STR(PG_GETARG_TEXT_P(0)); \
@@ -2039,7 +2044,7 @@ createConnHash(void)
2039
2044
}
2040
2045
2041
2046
static void
2042
- createNewConnection (const char * name , remoteConn * con )
2047
+ createNewConnection (const char * name , remoteConn * rconn )
2043
2048
{
2044
2049
remoteConnHashEnt * hentry ;
2045
2050
bool found ;
@@ -2058,7 +2063,7 @@ createNewConnection(const char *name, remoteConn * con)
2058
2063
(errcode (ERRCODE_DUPLICATE_OBJECT ),
2059
2064
errmsg ("duplicate connection name" )));
2060
2065
2061
- hentry -> rcon = con ;
2066
+ hentry -> rcon = rconn ;
2062
2067
strncpy (hentry -> name , name , NAMEDATALEN - 1 );
2063
2068
}
2064
2069
0 commit comments