|
13 | 13 | *
|
14 | 14 | *
|
15 | 15 | * IDENTIFICATION
|
16 |
| - * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.221 2009/04/15 21:36:12 alvherre Exp $ |
| 16 | + * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.222 2009/04/23 17:39:21 tgl Exp $ |
17 | 17 | *
|
18 | 18 | *-------------------------------------------------------------------------
|
19 | 19 | */
|
@@ -387,12 +387,12 @@ createdb(const CreatedbStmt *stmt)
|
387 | 387 | */
|
388 | 388 | if (strcmp(dbtemplate,"template0")!=0)
|
389 | 389 | {
|
390 |
| -if (strcmp(dbcollate,src_collate)) |
| 390 | +if (strcmp(dbcollate,src_collate)!=0) |
391 | 391 | ereport(ERROR,
|
392 | 392 | (errmsg("new collation is incompatible with the collation of the template database (%s)",src_collate),
|
393 | 393 | errhint("Use the same collation as in the template database, or use template0 as template.")));
|
394 | 394 |
|
395 |
| -if (strcmp(dbctype,src_ctype)) |
| 395 | +if (strcmp(dbctype,src_ctype)!=0) |
396 | 396 | ereport(ERROR,
|
397 | 397 | (errmsg("new LC_CTYPE is incompatible with LC_CTYPE of the template database (%s)",src_ctype),
|
398 | 398 | errhint("Use the same LC_CTYPE as in the template database, or use template0 as template.")));
|
|