@@ -2721,13 +2721,15 @@ get_connect_string(const char *servername)
27212721ForeignServer * foreign_server = NULL ;
27222722UserMapping * user_mapping ;
27232723ListCell * cell ;
2724- StringInfo buf = makeStringInfo () ;
2724+ StringInfoData buf ;
27252725ForeignDataWrapper * fdw ;
27262726AclResult aclresult ;
27272727char * srvname ;
27282728
27292729static const PQconninfoOption * options = NULL ;
27302730
2731+ initStringInfo (& buf );
2732+
27312733/*
27322734 * Get list of valid libpq options.
27332735 *
@@ -2769,7 +2771,7 @@ get_connect_string(const char *servername)
27692771DefElem * def = lfirst (cell );
27702772
27712773if (is_valid_dblink_option (options ,def -> defname ,ForeignDataWrapperRelationId ))
2772- appendStringInfo (buf ,"%s='%s' " ,def -> defname ,
2774+ appendStringInfo (& buf ,"%s='%s' " ,def -> defname ,
27732775escape_param_str (strVal (def -> arg )));
27742776}
27752777
@@ -2778,7 +2780,7 @@ get_connect_string(const char *servername)
27782780DefElem * def = lfirst (cell );
27792781
27802782if (is_valid_dblink_option (options ,def -> defname ,ForeignServerRelationId ))
2781- appendStringInfo (buf ,"%s='%s' " ,def -> defname ,
2783+ appendStringInfo (& buf ,"%s='%s' " ,def -> defname ,
27822784escape_param_str (strVal (def -> arg )));
27832785}
27842786
@@ -2788,11 +2790,11 @@ get_connect_string(const char *servername)
27882790DefElem * def = lfirst (cell );
27892791
27902792if (is_valid_dblink_option (options ,def -> defname ,UserMappingRelationId ))
2791- appendStringInfo (buf ,"%s='%s' " ,def -> defname ,
2793+ appendStringInfo (& buf ,"%s='%s' " ,def -> defname ,
27922794escape_param_str (strVal (def -> arg )));
27932795}
27942796
2795- return buf -> data ;
2797+ return buf . data ;
27962798}
27972799else
27982800return NULL ;
@@ -2807,16 +2809,18 @@ static char *
28072809escape_param_str (const char * str )
28082810{
28092811const char * cp ;
2810- StringInfo buf = makeStringInfo ();
2812+ StringInfoData buf ;
2813+
2814+ initStringInfo (& buf );
28112815
28122816for (cp = str ;* cp ;cp ++ )
28132817{
28142818if (* cp == '\\' || * cp == '\'' )
2815- appendStringInfoChar (buf ,'\\' );
2816- appendStringInfoChar (buf ,* cp );
2819+ appendStringInfoChar (& buf ,'\\' );
2820+ appendStringInfoChar (& buf ,* cp );
28172821}
28182822
2819- return buf -> data ;
2823+ return buf . data ;
28202824}
28212825
28222826/*