dblink_connname_20120326.patch

text/x-patch

Filename: dblink_connname_20120326.patch
Type: text/x-patch
Part: 1
Message: Re: Speed dblink using alternate libpq tuple storage

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
contrib/dblink/dblink.c 3 0
diff --git b/contrib/dblink/dblink.c a/contrib/dblink/dblink.c
index dd73aa5..b79f0c0 100644
--- b/contrib/dblink/dblink.c
+++ a/contrib/dblink/dblink.c
@@ -733,6 +733,7 @@ dblink_record_internal(FunctionCallInfo fcinfo, bool is_async)
 			else
 			{
 				DBLINK_GET_CONN;
+				conname = text_to_cstring(PG_GETARG_TEXT_PP(0));
 				sql = text_to_cstring(PG_GETARG_TEXT_PP(1));
 			}
 		}
@@ -763,6 +764,8 @@ dblink_record_internal(FunctionCallInfo fcinfo, bool is_async)
 		else
 			/* shouldn't happen */
 			elog(ERROR, "wrong number of arguments");
+
+		conname = text_to_cstring(PG_GETARG_TEXT_PP(0));
 	}
 
 	if (!conn)