Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8c5890b

Browse files
author
Commitfest Bot
committed
[PATCH]: ./postpone_string_buffer_creation_dblink.patch
1 parent fe29b2a commit 8c5890b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/dblink/dblink.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,15 +2875,12 @@ get_connect_string(const char *servername)
28752875
ForeignServer *foreign_server = NULL;
28762876
UserMapping *user_mapping;
28772877
ListCell *cell;
2878-
StringInfoData buf;
28792878
ForeignDataWrapper *fdw;
28802879
AclResult aclresult;
28812880
char *srvname;
28822881

28832882
static const PQconninfoOption *options = NULL;
28842883

2885-
initStringInfo(&buf);
2886-
28872884
/*
28882885
* Get list of valid libpq options.
28892886
*
@@ -2908,6 +2905,7 @@ get_connect_string(const char *servername)
29082905

29092906
if (foreign_server)
29102907
{
2908+
StringInfoData buf;
29112909
Oid serverid = foreign_server->serverid;
29122910
Oid fdwid = foreign_server->fdwid;
29132911
Oid userid = GetUserId();
@@ -2920,6 +2918,8 @@ get_connect_string(const char *servername)
29202918
if (aclresult != ACLCHECK_OK)
29212919
aclcheck_error(aclresult, OBJECT_FOREIGN_SERVER, foreign_server->servername);
29222920

2921+
initStringInfo(&buf);
2922+
29232923
/*
29242924
* First append hardcoded options needed for SCRAM pass-through, so if
29252925
* the user overwrites these options we can ereport on

0 commit comments

Comments
 (0)