Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita59793f

Browse files
committed
Disable alternate locations on Win32 because it doesn't support symlinks.
1 parent50ed78b commita59793f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/backend/commands/dbcommands.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* 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 $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -174,6 +174,11 @@ createdb(const CreatedbStmt *stmt)
174174
/* don't call this in a transaction block */
175175
PreventTransactionChain((void*)stmt,"CREATE DATABASE");
176176

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+
177182
/*
178183
* Check for db name conflict.There is a race condition here, since
179184
* another backend could create the same DB name before we commit.
@@ -296,7 +301,9 @@ createdb(const CreatedbStmt *stmt)
296301
/* Make the symlink, if needed */
297302
if (alt_loc)
298303
{
304+
#ifndefWIN32/* already throws error on WIN32 above */
299305
if (symlink(alt_loc,nominal_loc)!=0)
306+
#endif
300307
elog(ERROR,"CREATE DATABASE: could not link '%s' to '%s': %m",
301308
nominal_loc,alt_loc);
302309
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp