mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Put back encoding-conversion step in processing of incoming queries;
I had inadvertently omitted it while rearranging things to support length-counted incoming messages. Also, change the parser's API back to accepting a 'char *' query string instead of 'StringInfo', as the latter wasn't buying us anything except overhead. (I think when I put it in I had some notion of making the parser API 8-bit-clean, but seeing that flex depends on null-terminated input, that's not really ever gonna happen.)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
*
|
||||
* Copyright (c) 2001-2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.34 2003/04/26 02:57:14 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.35 2003/04/27 20:09:44 tgl Exp $
|
||||
* ----------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
@@ -446,7 +446,7 @@ pgstat_bestart(void)
|
||||
* ----------
|
||||
*/
|
||||
void
|
||||
pgstat_report_activity(char *what)
|
||||
pgstat_report_activity(const char *what)
|
||||
{
|
||||
PgStat_MsgActivity msg;
|
||||
int len;
|
||||
@@ -455,7 +455,8 @@ pgstat_report_activity(char *what)
|
||||
return;
|
||||
|
||||
len = strlen(what);
|
||||
len = pg_mbcliplen((const unsigned char *) what, len, PGSTAT_ACTIVITY_SIZE - 1);
|
||||
len = pg_mbcliplen((const unsigned char *) what, len,
|
||||
PGSTAT_ACTIVITY_SIZE - 1);
|
||||
|
||||
memcpy(msg.m_what, what, len);
|
||||
msg.m_what[len] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user