mirror of
https://github.com/postgres/postgres.git
synced 2025-08-21 10:42:50 +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:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.526 2007/03/02 23:37:22 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.527 2007/03/03 19:32:54 neilc Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@@ -205,10 +205,7 @@ InteractiveBackend(StringInfo inBuf)
|
||||
printf("backend> ");
|
||||
fflush(stdout);
|
||||
|
||||
/* Reset inBuf to empty */
|
||||
inBuf->len = 0;
|
||||
inBuf->data[0] = '\0';
|
||||
inBuf->cursor = 0;
|
||||
resetStringInfo(inBuf);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
Reference in New Issue
Block a user