diff --git a/src/backend/tcop/dest.c b/src/backend/tcop/dest.c index 129cd77570..77ae7ad124 100644 --- a/src/backend/tcop/dest.c +++ b/src/backend/tcop/dest.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/dest.c,v 1.75 2009/01/01 17:23:48 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/dest.c,v 1.75.2.1 2010/01/30 20:09:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -142,7 +142,11 @@ EndCommand(const char *commandTag, CommandDest dest) { case DestRemote: case DestRemoteExecute: - pq_puttextmessage('C', commandTag); + /* + * We assume the commandTag is plain ASCII and therefore + * requires no encoding conversion. + */ + pq_putmessage('C', commandTag, strlen(commandTag) + 1); break; case DestNone: @@ -183,7 +187,7 @@ NullCommand(CommandDest dest) if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 3) pq_putemptymessage('I'); else - pq_puttextmessage('I', ""); + pq_putmessage('I', "", 1); break; case DestNone: