|
13 | 13 | * |
14 | 14 | * |
15 | 15 | * IDENTIFICATION |
16 | | - * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.222 2009/04/23 17:39:21 tgl Exp $ |
| 16 | + * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.223 2009/05/05 23:39:55 tgl Exp $ |
17 | 17 | * |
18 | 18 | *------------------------------------------------------------------------- |
19 | 19 | */ |
@@ -332,10 +332,12 @@ createdb(const CreatedbStmt *stmt) |
332 | 332 | errmsg("invalid locale name %s",dbctype))); |
333 | 333 |
|
334 | 334 | /* |
335 | | - * Check whether encoding matches server locale settings. We allow |
336 | | - * mismatch in three cases: |
| 335 | + * Check whether chosen encoding matches chosen locale settings. This |
| 336 | + * restriction is necessary because libc's locale-specific code usually |
| 337 | + * fails when presented with data in an encoding it's not expecting. |
| 338 | + * We allow mismatch in three cases: |
337 | 339 | * |
338 | | - * 1.ctype_encoding = SQL_ASCII, which means either that the locale is |
| 340 | + * 1.locale encoding = SQL_ASCII, which means either that the locale is |
339 | 341 | * C/POSIX which works with any encoding, or that we couldn't determine |
340 | 342 | * the locale's encoding and have to trust the user to get it right. |
341 | 343 | * |
|