1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

Add resetStringInfo(), which clears the content of a StringInfo, and

fixup various places in the tree that were clearing a StringInfo by hand.
Making this function a part of the API simplifies client code slightly,
and avoids needlessly peeking inside the StringInfo interface.
This commit is contained in:
Neil Conway
2007-03-03 19:32:55 +00:00
parent 053981f405
commit 90d76525c5
11 changed files with 57 additions and 69 deletions

View File

@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.45 2007/03/03 18:46:40 momjian Exp $
* $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.46 2007/03/03 19:32:54 neilc Exp $
*
* Interface:
*
@@ -933,8 +933,7 @@ DeadLockReport(void)
appendStringInfoChar(&buf, '\n');
/* reset buf2 to hold next object description */
buf2.len = 0;
buf2.data[0] = '\0';
resetStringInfo(&buf2);
DescribeLockTag(&buf2, &info->locktag);