Fixup some misusage of appendStringInfo and friends

Started by David Rowleyover 8 years ago7 messages
#1David Rowley
david.rowley@2ndquadrant.com
1 attachment(s)

The attached cleans up a few small misusages of appendStringInfo and
related functions.

Some similar work was done in,

f92d6a540ac443f85f0929b284edff67da14687a
d02f16470f117db3038dbfd87662d5f0eb5a2a9b
cacbdd78106526d7c4f11f90b538f96ba8696fb0

so the majority of these should all be new misuseages.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

appendStringInfo_fixes.patchapplication/octet-stream; name=appendStringInfo_fixes.patchDownload
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 1d5aa83..2427ba22 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -973,7 +973,7 @@ deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *rel,
 		/* Append HAVING clause */
 		if (remote_conds)
 		{
-			appendStringInfo(buf, " HAVING ");
+			appendStringInfoString(buf, " HAVING ");
 			appendConditions(remote_conds, &context);
 		}
 	}
@@ -1076,7 +1076,7 @@ deparseFromExpr(List *quals, deparse_expr_cxt *context)
 	/* Construct WHERE clause */
 	if (quals != NIL)
 	{
-		appendStringInfo(buf, " WHERE ");
+		appendStringInfoString(buf, " WHERE ");
 		appendConditions(quals, context);
 	}
 }
@@ -1447,15 +1447,15 @@ deparseFromExprForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel,
 			context.root = root;
 			context.params_list = params_list;
 
-			appendStringInfo(buf, "(");
+			appendStringInfoChar(buf, '(');
 			appendConditions(fpinfo->joinclauses, &context);
-			appendStringInfo(buf, ")");
+			appendStringInfoChar(buf, ')');
 		}
 		else
 			appendStringInfoString(buf, "(TRUE)");
 
 		/* End the FROM clause entry. */
-		appendStringInfo(buf, ")");
+		appendStringInfoChar(buf, ')');
 	}
 	else
 	{
@@ -1702,7 +1702,7 @@ deparseDirectUpdateSql(StringInfo buf, PlannerInfo *root,
 
 	if (remote_conds)
 	{
-		appendStringInfo(buf, " WHERE ");
+		appendStringInfoString(buf, " WHERE ");
 		appendConditions(remote_conds, &context);
 	}
 
@@ -1762,7 +1762,7 @@ deparseDirectDeleteSql(StringInfo buf, PlannerInfo *root,
 
 	if (remote_conds)
 	{
-		appendStringInfo(buf, " WHERE ");
+		appendStringInfoString(buf, " WHERE ");
 		appendConditions(remote_conds, &context);
 	}
 
@@ -1978,17 +1978,17 @@ deparseColumnRef(StringInfo buf, int varno, int varattno, PlannerInfo *root,
 		{
 			appendStringInfoString(buf, "CASE WHEN (");
 			ADD_REL_QUALIFIER(buf, varno);
-			appendStringInfo(buf, "*)::text IS NOT NULL THEN ");
+			appendStringInfoString(buf, "*)::text IS NOT NULL THEN ");
 		}
 
 		appendStringInfoString(buf, "ROW(");
 		deparseTargetList(buf, root, varno, rel, false, attrs_used, qualify_col,
 						  &retrieved_attrs);
-		appendStringInfoString(buf, ")");
+		appendStringInfoChar(buf, ')');
 
 		/* Complete the CASE WHEN statement started above. */
 		if (qualify_col)
-			appendStringInfo(buf, " END");
+			appendStringInfoString(buf, " END");
 
 		heap_close(rel, NoLock);
 		bms_free(attrs_used);
@@ -2759,7 +2759,7 @@ deparseAggref(Aggref *node, deparse_expr_cxt *context)
 	appendStringInfoChar(buf, '(');
 
 	/* Add DISTINCT */
-	appendStringInfo(buf, "%s", (node->aggdistinct != NIL) ? "DISTINCT " : "");
+	appendStringInfoString(buf, (node->aggdistinct != NIL) ? "DISTINCT " : "");
 
 	if (AGGKIND_IS_ORDERED_SET(node->aggkind))
 	{
@@ -2944,7 +2944,7 @@ appendGroupByClause(List *tlist, deparse_expr_cxt *context)
 	if (!query->groupClause)
 		return;
 
-	appendStringInfo(buf, " GROUP BY ");
+	appendStringInfoString(buf, " GROUP BY ");
 
 	/*
 	 * Queries with grouping sets are not pushed down, so we don't expect
@@ -2981,7 +2981,7 @@ appendOrderByClause(List *pathkeys, deparse_expr_cxt *context)
 	/* Make sure any constants in the exprs are printed portably */
 	nestlevel = set_transmission_modes();
 
-	appendStringInfo(buf, " ORDER BY");
+	appendStringInfoString(buf, " ORDER BY");
 	foreach(lcell, pathkeys)
 	{
 		PathKey    *pathkey = lfirst(lcell);
@@ -3035,7 +3035,7 @@ appendFunctionName(Oid funcid, deparse_expr_cxt *context)
 
 	/* Always print the function name */
 	proname = NameStr(procform->proname);
-	appendStringInfo(buf, "%s", quote_identifier(proname));
+	appendStringInfoString(buf, quote_identifier(proname));
 
 	ReleaseSysCache(proctup);
 }
@@ -3070,9 +3070,9 @@ deparseSortGroupClause(Index ref, List *tlist, deparse_expr_cxt *context)
 	else
 	{
 		/* Always parenthesize the expression. */
-		appendStringInfoString(buf, "(");
+		appendStringInfoChar(buf, '(');
 		deparseExpr(expr, context);
-		appendStringInfoString(buf, ")");
+		appendStringInfoChar(buf, ')');
 	}
 
 	return (Node *) expr;
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 35dccbc..58767f7 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -1003,9 +1003,9 @@ fetch_table_list(WalReceiverConn *wrconn, List *publications)
 	Assert(list_length(publications) > 0);
 
 	initStringInfo(&cmd);
-	appendStringInfo(&cmd, "SELECT DISTINCT t.schemaname, t.tablename\n"
-						   "  FROM pg_catalog.pg_publication_tables t\n"
-						   " WHERE t.pubname IN (");
+	appendStringInfoString(&cmd, "SELECT DISTINCT t.schemaname, t.tablename\n"
+								 "  FROM pg_catalog.pg_publication_tables t\n"
+								 " WHERE t.pubname IN (");
 	first = true;
 	foreach (lc, publications)
 	{
@@ -1016,9 +1016,9 @@ fetch_table_list(WalReceiverConn *wrconn, List *publications)
 		else
 			appendStringInfoString(&cmd, ", ");
 
-		appendStringInfo(&cmd, "%s", quote_literal_cstr(pubname));
+		appendStringInfoString(&cmd, quote_literal_cstr(pubname));
 	}
-	appendStringInfoString(&cmd, ")");
+	appendStringInfoChar(&cmd, ')');
 
 	res = walrcv_exec(wrconn, cmd.data, 2, tableRow);
 	pfree(cmd.data);
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 28cef85..7ae7381 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -80,7 +80,7 @@
 
 /* Write a character-string (possibly NULL) field */
 #define WRITE_STRING_FIELD(fldname) \
-	(appendStringInfo(str, " :" CppAsString(fldname) " "), \
+	(appendStringInfoString(str, " :" CppAsString(fldname) " "), \
 	 outToken(str, node->fldname))
 
 /* Write a parse location field (actually same as INT case) */
@@ -89,12 +89,12 @@
 
 /* Write a Node field */
 #define WRITE_NODE_FIELD(fldname) \
-	(appendStringInfo(str, " :" CppAsString(fldname) " "), \
+	(appendStringInfoString(str, " :" CppAsString(fldname) " "), \
 	 outNode(str, node->fldname))
 
 /* Write a bitmapset field */
 #define WRITE_BITMAPSET_FIELD(fldname) \
-	(appendStringInfo(str, " :" CppAsString(fldname) " "), \
+	(appendStringInfoString(str, " :" CppAsString(fldname) " "), \
 	 outBitmapset(str, node->fldname))
 
 
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index 9d7bb25..0975159 100644
--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
@@ -350,7 +350,7 @@ libpqrcv_startstreaming(WalReceiverConn *conn,
 						 options->slotname);
 
 	if (options->logical)
-		appendStringInfo(&cmd, " LOGICAL");
+		appendStringInfoString(&cmd, " LOGICAL");
 
 	appendStringInfo(&cmd, " %X/%X",
 					 (uint32) (options->startpoint >> 32),
@@ -746,21 +746,21 @@ libpqrcv_create_slot(WalReceiverConn *conn, const char *slotname,
 	appendStringInfo(&cmd, "CREATE_REPLICATION_SLOT \"%s\"", slotname);
 
 	if (temporary)
-		appendStringInfo(&cmd, " TEMPORARY");
+		appendStringInfoString(&cmd, " TEMPORARY");
 
 	if (conn->logical)
 	{
-		appendStringInfo(&cmd, " LOGICAL pgoutput");
+		appendStringInfoString(&cmd, " LOGICAL pgoutput");
 		switch (snapshot_action)
 		{
 			case CRS_EXPORT_SNAPSHOT:
-				appendStringInfo(&cmd, " EXPORT_SNAPSHOT");
+				appendStringInfoString(&cmd, " EXPORT_SNAPSHOT");
 				break;
 			case CRS_NOEXPORT_SNAPSHOT:
-				appendStringInfo(&cmd, " NOEXPORT_SNAPSHOT");
+				appendStringInfoString(&cmd, " NOEXPORT_SNAPSHOT");
 				break;
 			case CRS_USE_SNAPSHOT:
-				appendStringInfo(&cmd, " USE_SNAPSHOT");
+				appendStringInfoString(&cmd, " USE_SNAPSHOT");
 				break;
 		}
 	}
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 184e5da..c3b8aec 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1647,11 +1647,11 @@ pg_get_partkeydef_worker(Oid relid, int prettyFlags,
 	{
 		case PARTITION_STRATEGY_LIST:
 			if (!attrsOnly)
-				appendStringInfo(&buf, "LIST");
+				appendStringInfoString(&buf, "LIST");
 			break;
 		case PARTITION_STRATEGY_RANGE:
 			if (!attrsOnly)
-				appendStringInfo(&buf, "RANGE");
+				appendStringInfoString(&buf, "RANGE");
 			break;
 		default:
 			elog(ERROR, "unexpected partition strategy: %d",
@@ -1659,7 +1659,7 @@ pg_get_partkeydef_worker(Oid relid, int prettyFlags,
 	}
 
 	if (!attrsOnly)
-		appendStringInfo(&buf, " (");
+		appendStringInfoString(&buf, " (");
 	sep = "";
 	for (keyno = 0; keyno < form->partnatts; keyno++)
 	{
@@ -5575,10 +5575,10 @@ get_rule_sortgroupclause(Index ref, List *tlist, bool force_colno,
 								  ||IsA(expr, WindowFunc));
 
 		if (need_paren)
-			appendStringInfoString(context->buf, "(");
+			appendStringInfoChar(context->buf, '(');
 		get_rule_expr(expr, context, true);
 		if (need_paren)
-			appendStringInfoString(context->buf, ")");
+			appendStringInfoChar(context->buf, ')');
 	}
 
 	return expr;
@@ -5605,7 +5605,7 @@ get_rule_groupingset(GroupingSet *gset, List *targetlist,
 		case GROUPING_SET_SIMPLE:
 			{
 				if (!omit_parens || list_length(gset->content) != 1)
-					appendStringInfoString(buf, "(");
+					appendStringInfoChar(buf, '(');
 
 				foreach(l, gset->content)
 				{
@@ -5618,7 +5618,7 @@ get_rule_groupingset(GroupingSet *gset, List *targetlist,
 				}
 
 				if (!omit_parens || list_length(gset->content) != 1)
-					appendStringInfoString(buf, ")");
+					appendStringInfoChar(buf, ')');
 			}
 			return;
 
@@ -5641,7 +5641,7 @@ get_rule_groupingset(GroupingSet *gset, List *targetlist,
 		sep = ", ";
 	}
 
-	appendStringInfoString(buf, ")");
+	appendStringInfoChar(buf, ')');
 }
 
 /*
@@ -8626,7 +8626,7 @@ get_rule_expr(Node *node, deparse_context *context,
 							sep = ", ";
 						}
 
-						appendStringInfoString(buf, ")");
+						appendStringInfoChar(buf, ')');
 						break;
 
 					case PARTITION_STRATEGY_RANGE:
@@ -8654,7 +8654,7 @@ get_rule_expr(Node *node, deparse_context *context,
 							}
 							sep = ", ";
 						}
-						appendStringInfoString(buf, ")");
+						appendStringInfoChar(buf, ')');
 
 						appendStringInfoString(buf, " TO");
 						appendStringInfoString(buf, " (");
@@ -8674,7 +8674,7 @@ get_rule_expr(Node *node, deparse_context *context,
 							}
 							sep = ", ";
 						}
-						appendStringInfoString(buf, ")");
+						appendStringInfoChar(buf, ')');
 						break;
 
 					default:
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 2f87151..3e93c7b 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -3445,8 +3445,8 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
 			case BPCHAROID:
 			case VARCHAROID:
 			case TEXTOID:
-				appendStringInfo(&result,
-								 "  <xsd:restriction base=\"xsd:string\">\n");
+				appendStringInfoString(&result,
+									   "  <xsd:restriction base=\"xsd:string\">\n");
 				if (typmod != -1)
 					appendStringInfo(&result,
 									 "    <xsd:maxLength value=\"%d\"/>\n",
diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c
index 2cd7581..5d8c2b6 100644
--- a/src/backend/utils/mmgr/freepage.c
+++ b/src/backend/utils/mmgr/freepage.c
@@ -455,7 +455,7 @@ FreePageManagerDump(FreePageManager *fpm)
 	recycle = relptr_access(base, fpm->btree_recycle);
 	if (recycle != NULL)
 	{
-		appendStringInfo(&buf, "btree recycle:");
+		appendStringInfoString(&buf, "btree recycle:");
 		FreePageManagerDumpSpans(fpm, recycle, 1, &buf);
 	}
 
@@ -468,7 +468,7 @@ FreePageManagerDump(FreePageManager *fpm)
 			continue;
 		if (!dumped_any_freelist)
 		{
-			appendStringInfo(&buf, "freelists:\n");
+			appendStringInfoString(&buf, "freelists:\n");
 			dumped_any_freelist = true;
 		}
 		appendStringInfo(&buf, "  %zu:", f + 1);
@@ -1275,7 +1275,7 @@ FreePageManagerDumpBtree(FreePageManager *fpm, FreePageBtree *btp,
 							 btp->u.leaf_key[index].first_page,
 							 btp->u.leaf_key[index].npages);
 	}
-	appendStringInfo(buf, "\n");
+	appendStringInfoChar(buf, '\n');
 
 	if (btp->hdr.magic == FREE_PAGE_INTERNAL_MAGIC)
 	{
@@ -1308,7 +1308,7 @@ FreePageManagerDumpSpans(FreePageManager *fpm, FreePageSpanLeader *span,
 		span = relptr_access(base, span->next);
 	}
 
-	appendStringInfo(buf, "\n");
+	appendStringInfoChar(buf, '\n');
 }
 
 /*
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index e9b5c8a..55c2f4c 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15339,7 +15339,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
 
 			if (tbinfo->partitiondef && !dopt->binary_upgrade)
 			{
-				appendPQExpBufferStr(q, "\n");
+				appendPQExpBufferChar(q, '\n');
 				appendPQExpBufferStr(q, tbinfo->partitiondef);
 			}
 
@@ -17019,8 +17019,7 @@ dumpRule(Archive *fout, RuleInfo *rinfo)
 
 		appendPQExpBuffer(delcmd, "CREATE OR REPLACE VIEW %s.",
 						  fmtId(tbinfo->dobj.namespace->dobj.name));
-		appendPQExpBuffer(delcmd, "%s",
-						  fmtId(tbinfo->dobj.name));
+		appendPQExpBufferStr(delcmd, fmtId(tbinfo->dobj.name));
 		result = createDummyViewAsClause(fout, tbinfo);
 		appendPQExpBuffer(delcmd, " AS\n%s;\n", result->data);
 		destroyPQExpBuffer(result);
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 0bf5b7c..7597785 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -1560,7 +1560,7 @@ dumpDatabaseConfig(PGconn *conn, const char *dbname)
 		appendStringLiteralConn(buf, dbname, conn);
 
 		if (server_version >= 90000)
-			appendPQExpBuffer(buf, ")");
+			appendPQExpBufferChar(buf, ')');
 
 		res = executeQuery(conn, buf->data);
 		if (PQntuples(res) == 1 &&
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 859ded7..a220fa0 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -4668,7 +4668,7 @@ get_create_object_cmd(EditableObjectType obj_type, Oid oid,
 							psql_error("could not parse reloptions array\n");
 							result = false;
 						}
-						appendPQExpBufferStr(buf, ")");
+						appendPQExpBufferChar(buf, ')');
 					}
 
 					/* View definition from pg_get_viewdef (a SELECT query) */
@@ -4854,7 +4854,7 @@ minimal_error_message(PGresult *res)
 		appendPQExpBufferStr(msg, fld);
 	else
 		appendPQExpBufferStr(msg, "(not available)");
-	appendPQExpBufferStr(msg, "\n");
+	appendPQExpBufferChar(msg, '\n');
 
 	psql_error("%s", msg->data);
 
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 0f9f497..8cd36fa 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3139,7 +3139,7 @@ describeRoles(const char *pattern, bool verbose, bool showSystem)
 		if (strcmp(PQgetvalue(res, i, 7), "") != 0)
 		{
 			if (buf.len > 0)
-				appendPQExpBufferStr(&buf, "\n");
+				appendPQExpBufferChar(&buf, '\n');
 			appendPQExpBufferStr(&buf, _("Password valid until "));
 			appendPQExpBufferStr(&buf, PQgetvalue(res, i, 7));
 		}
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c
index 3d74797..22278f1 100644
--- a/src/bin/scripts/createuser.c
+++ b/src/bin/scripts/createuser.c
@@ -324,7 +324,7 @@ main(int argc, char *argv[])
 			if (cell->next)
 				appendPQExpBuffer(&sql, "%s,", fmtId(cell->val));
 			else
-				appendPQExpBuffer(&sql, "%s", fmtId(cell->val));
+				appendPQExpBufferStr(&sql, fmtId(cell->val));
 		}
 	}
 	appendPQExpBufferChar(&sql, ';');
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index bf4c27c..be3d239 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -5349,8 +5349,8 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri,
 		if (prevchar != ',')
 			break;
 		++p;						/* advance past comma separator */
-		appendPQExpBufferStr(&hostbuf, ",");
-		appendPQExpBufferStr(&portbuf, ",");
+		appendPQExpBufferChar(&hostbuf, ',');
+		appendPQExpBufferChar(&portbuf, ',');
 	}
 
 	/* Save final values for host and port. */
#2Ashutosh Bapat
ashutosh.bapat@enterprisedb.com
In reply to: David Rowley (#1)
Re: Fixup some misusage of appendStringInfo and friends

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

On Wed, Apr 19, 2017 at 9:13 AM, David Rowley
<david.rowley@2ndquadrant.com> wrote:

The attached cleans up a few small misusages of appendStringInfo and
related functions.

Some similar work was done in,

f92d6a540ac443f85f0929b284edff67da14687a
d02f16470f117db3038dbfd87662d5f0eb5a2a9b
cacbdd78106526d7c4f11f90b538f96ba8696fb0

so the majority of these should all be new misuseages.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Ashutosh Bapat (#2)
Re: Fixup some misusage of appendStringInfo and friends

On 4/19/17 08:42, Ashutosh Bapat wrote:

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

Looks reasonable. Let's keep it for the next commit fest.

On Wed, Apr 19, 2017 at 9:13 AM, David Rowley
<david.rowley@2ndquadrant.com> wrote:

The attached cleans up a few small misusages of appendStringInfo and
related functions.

Some similar work was done in,

f92d6a540ac443f85f0929b284edff67da14687a
d02f16470f117db3038dbfd87662d5f0eb5a2a9b
cacbdd78106526d7c4f11f90b538f96ba8696fb0

so the majority of these should all be new misuseages.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4David Rowley
david.rowley@2ndquadrant.com
In reply to: Peter Eisentraut (#3)
Re: Fixup some misusage of appendStringInfo and friends

On 27 April 2017 at 06:41, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

On 4/19/17 08:42, Ashutosh Bapat wrote:

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

Looks reasonable. Let's keep it for the next commit fest.

Thank you to both of you for looking. I'd thought that maybe the new
stuff in PG10 should be fixed before the release. If we waited, and
fix in PG11 then backpatching is more of a pain.

However, I wasn't careful in the patch to touch only new to PG10 code.

I'll defer to your better judgment and add to the next 'fest.

Thanks

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Heikki Linnakangas
hlinnaka@iki.fi
In reply to: David Rowley (#4)
Re: Fixup some misusage of appendStringInfo and friends

On 04/27/2017 03:14 AM, David Rowley wrote:

On 27 April 2017 at 06:41, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

On 4/19/17 08:42, Ashutosh Bapat wrote:

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

Looks reasonable. Let's keep it for the next commit fest.

Thank you to both of you for looking. I'd thought that maybe the new
stuff in PG10 should be fixed before the release. If we waited, and
fix in PG11 then backpatching is more of a pain.

However, I wasn't careful in the patch to touch only new to PG10 code.

I'll defer to your better judgment and add to the next 'fest.

I think that's a very good argument. Cleaning up code that's new in this
version seems like a fair game, and a good idea. The places that are not
new in PostgreSQL 10 are more questionable, but seems harmless enough
anyway.

Did you have an outright objection to this, Peter? The patch looks good
to me at a quick glance, I think we should commit this now.

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: David Rowley (#4)
Re: Fixup some misusage of appendStringInfo and friends

On 4/26/17 20:14, David Rowley wrote:

On 27 April 2017 at 06:41, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

On 4/19/17 08:42, Ashutosh Bapat wrote:

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

Looks reasonable. Let's keep it for the next commit fest.

Thank you to both of you for looking. I'd thought that maybe the new
stuff in PG10 should be fixed before the release. If we waited, and
fix in PG11 then backpatching is more of a pain.

However, I wasn't careful in the patch to touch only new to PG10 code.

I'll defer to your better judgment and add to the next 'fest.

committed

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#7David Rowley
david.rowley@2ndquadrant.com
In reply to: Peter Eisentraut (#6)
Re: Fixup some misusage of appendStringInfo and friends

On 16 August 2017 at 15:38, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

committed

Thanks!

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers