|
9 | 9 | * |
10 | 10 | * |
11 | 11 | * IDENTIFICATION |
12 | | - * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.112 2003/04/0420:42:12 momjian Exp $ |
| 12 | + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.113 2003/05/0404:42:52 momjian Exp $ |
13 | 13 | * |
14 | 14 | *------------------------------------------------------------------------- |
15 | 15 | */ |
@@ -174,6 +174,11 @@ createdb(const CreatedbStmt *stmt) |
174 | 174 | /* don't call this in a transaction block */ |
175 | 175 | PreventTransactionChain((void*)stmt,"CREATE DATABASE"); |
176 | 176 |
|
| 177 | +#ifdefWIN32 |
| 178 | +if (dbpath!=NULL)/* platform has no symlinks */ |
| 179 | +elog(ERROR,"CREATE DATABASE: may not use an alternate location on this platform"); |
| 180 | +#endif |
| 181 | + |
177 | 182 | /* |
178 | 183 | * Check for db name conflict.There is a race condition here, since |
179 | 184 | * another backend could create the same DB name before we commit. |
@@ -296,7 +301,9 @@ createdb(const CreatedbStmt *stmt) |
296 | 301 | /* Make the symlink, if needed */ |
297 | 302 | if (alt_loc) |
298 | 303 | { |
| 304 | +#ifndefWIN32/* already throws error on WIN32 above */ |
299 | 305 | if (symlink(alt_loc,nominal_loc)!=0) |
| 306 | +#endif |
300 | 307 | elog(ERROR,"CREATE DATABASE: could not link '%s' to '%s': %m", |
301 | 308 | nominal_loc,alt_loc); |
302 | 309 | } |
|