Re: control max length of parameter values logged - Mailing list pgsql-hackers

From Tom Lane
Subject Re: control max length of parameter values logged
Date
Msg-id 12408.1585853519@sss.pgh.pa.us
Whole thread Raw
In response to Re: control max length of parameter values logged  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> More or less.  If you don't add these chars, mbcliplen doesn't think
> there's character there, so it ends up not adding the ellipsis.  (I
> don't remember why it has to be two chars rather than just one.)

I think the idea is to be sure that there's a full multibyte character
after the truncation point; if the truncation point is within a multibyte
character, then you might have only a partial multibyte character after
that, which could cause problems.  Doing it this way, mbcliplen will
never look at the last possibly-truncated character.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: Should we add xid_current() or a int8->xid cast?
Next
From: Robert Haas
Date:
Subject: Re: backup manifests