From 90d76525c5cc2f3f4781351a1d99be839dfa2874 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Sat, 3 Mar 2007 19:32:55 +0000 Subject: 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. --- src/backend/tcop/postgres.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index afb6b4db0a1..cfb6731b234 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -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 (;;) { -- cgit v1.2.3