From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Alexey Bashtanov <bashtanov(at)imap(dot)cc>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: control max length of parameter values logged |
Date: | 2020-04-02 18:51:59 |
Message-ID: | 12408.1585853519@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-04-02 18:55:19 | Re: backup manifests |
Previous Message | Mark Dilger | 2020-04-02 18:47:32 | Re: Should we add xid_current() or a int8->xid cast? |