diff options
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r-- | src/interfaces/libpq/fe-misc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index 55021fa5bf3..f92d7c0c7d1 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -1180,13 +1180,9 @@ pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time) */ /* - * Returns the byte length of the character beginning at s, using the - * specified encoding. - * - * Caution: when dealing with text that is not certainly valid in the - * specified encoding, the result may exceed the actual remaining - * string length. Callers that are not prepared to deal with that - * should use PQmblenBounded() instead. + * Like pg_encoding_mblen(). Use this in callers that want the + * dynamically-linked libpq's stance on encodings, even if that means + * different behavior in different startups of the executable. */ int PQmblen(const char *s, int encoding) @@ -1195,8 +1191,9 @@ PQmblen(const char *s, int encoding) } /* - * Returns the byte length of the character beginning at s, using the - * specified encoding; but not more than the distance to end of string. + * Like pg_encoding_mblen_bounded(). Use this in callers that want the + * dynamically-linked libpq's stance on encodings, even if that means + * different behavior in different startups of the executable. */ int PQmblenBounded(const char *s, int encoding) |