aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r--src/interfaces/libpq/fe-misc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index d091f6e6dbc..2a844167a77 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -24,7 +24,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.20 1998/09/01 04:40:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.21 1998/09/03 02:10:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -174,15 +174,14 @@ pqGetnchar(char *s, int len, PGconn *conn)
conn->inCursor += len;
if (conn->Pfdebug)
- fprintf(conn->Pfdebug, "From backend (%d)> %s\n", len, s);
+ fprintf(conn->Pfdebug, "From backend (%d)> %.*s\n", len, len, s);
return 0;
}
/* --------------------------------------------------------------------- */
/* pqPutnchar:
- send a string of exactly len bytes
- The buffer should have a terminating null, but it's not sent.
+ send a string of exactly len bytes, no null termination needed
*/
int
pqPutnchar(const char *s, int len, PGconn *conn)
@@ -191,7 +190,7 @@ pqPutnchar(const char *s, int len, PGconn *conn)
return EOF;
if (conn->Pfdebug)
- fprintf(conn->Pfdebug, "To backend> %s\n", s);
+ fprintf(conn->Pfdebug, "To backend> %.*s\n", len, s);
return 0;
}