Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8af3596

Browse files
committed
Async dblink functions require a named connection, and therefore should
use DBLINK_GET_NAMED_CONN rather than DBLINK_GET_CONN.Problem found by Peter Eisentraut and patch by Fujii Masao.
1 parenteb03cff commit8af3596

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

‎contrib/dblink/dblink.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,16 +613,13 @@ Datum
613613
dblink_send_query(PG_FUNCTION_ARGS)
614614
{
615615
PGconn*conn=NULL;
616-
char*connstr=NULL;
617616
char*sql=NULL;
618617
remoteConn*rconn=NULL;
619-
char*msg;
620-
boolfreeconn= false;
621618
intretval;
622619

623620
if (PG_NARGS()==2)
624621
{
625-
DBLINK_GET_CONN;
622+
DBLINK_GET_NAMED_CONN;
626623
sql=text_to_cstring(PG_GETARG_TEXT_PP(1));
627624
}
628625
else
@@ -711,13 +708,13 @@ dblink_record_internal(FunctionCallInfo fcinfo, bool is_async)
711708
if (PG_NARGS()==2)
712709
{
713710
/* text,bool */
714-
DBLINK_GET_CONN;
711+
DBLINK_GET_NAMED_CONN;
715712
fail=PG_GETARG_BOOL(1);
716713
}
717714
elseif (PG_NARGS()==1)
718715
{
719716
/* text */
720-
DBLINK_GET_CONN;
717+
DBLINK_GET_NAMED_CONN;
721718
}
722719
else
723720
/* shouldn't happen */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp