Fix bug per Oleksiy Shchukin - 2nd argument for dblink_get_result(text,bool)
authorJoe Conway <mail@joeconway.com>
Sat, 3 Jan 2009 19:57:54 +0000 (19:57 +0000)
committerJoe Conway <mail@joeconway.com>
Sat, 3 Jan 2009 19:57:54 +0000 (19:57 +0000)
is PG_GETARG_BOOL(2), should be PG_GETARG_BOOL(1).

Apply simple fix to back branches only. More extensive change to be applied
to head per Tom's suggestion.

contrib/dblink/dblink.c

index 7400ea56729082aa10d1bac8175aa5962eef8ff3..5d7ebccd245180d7969307f7403c04a56d247059 100644 (file)
@@ -809,7 +809,7 @@ dblink_record_internal(FunctionCallInfo fcinfo, bool is_async, bool do_get)
                        {
                                /* text,bool */
                                DBLINK_GET_CONN;
-                               fail = PG_GETARG_BOOL(2);
+                               fail = PG_GETARG_BOOL(1);
                        }
                        else if (PG_NARGS() == 1)
                        {