|
4 | 4 | * (currently mule internal code (mic) is used) |
5 | 5 | * Tatsuo Ishii |
6 | 6 | * |
7 | | - * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.74 2008/11/10 15:18:40 tgl Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.75 2008/11/11 03:01:20 tgl Exp $ |
8 | 8 | */ |
9 | 9 | #include"postgres.h" |
10 | 10 |
|
@@ -221,8 +221,14 @@ pg_get_client_encoding_name(void) |
221 | 221 | * it's taken from pg_catalog schema. If it even is not in the schema, |
222 | 222 | * warn and return src. |
223 | 223 | * |
| 224 | + * If conversion occurs, a palloc'd null-terminated string is returned. |
224 | 225 | * In the case of no conversion, src is returned. |
225 | 226 | * |
| 227 | + * CAUTION: although the presence of a length argument means that callers |
| 228 | + * can pass non-null-terminated strings, care is required because the same |
| 229 | + * string will be passed back if no conversion occurs. Such callers *must* |
| 230 | + * check whether result == src and handle that case differently. |
| 231 | + * |
226 | 232 | * Note: we try to avoid raising error, since that could get us into |
227 | 233 | * infinite recursion when this function is invoked during error message |
228 | 234 | * sending. It should be OK to raise error for overlength strings though, |
|