aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-05-07 03:47:08 +0000
committerBruce Momjian <bruce@momjian.us>2003-05-07 03:47:08 +0000
commit07d35e4277da141475793cc67c373183ecd71453 (patch)
treedeadaf1f4015413e9a2252901708760d537138c8 /src/backend/commands/dbcommands.c
parent6165a278e52046de6e6c9ccf854566b6a1e22f0f (diff)
downloadpostgresql-07d35e4277da141475793cc67c373183ecd71453.tar.gz
postgresql-07d35e4277da141475793cc67c373183ecd71453.zip
Change alternate database location patch to test for symlink() rather
than WIN32.
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r--src/backend/commands/dbcommands.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 6a680bc1a19..1c3b554c291 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.113 2003/05/04 04:42:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.114 2003/05/07 03:47:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -174,8 +174,8 @@ createdb(const CreatedbStmt *stmt)
/* don't call this in a transaction block */
PreventTransactionChain((void *) stmt, "CREATE DATABASE");
-#ifdef WIN32
- if (dbpath != NULL) /* platform has no symlinks */
+#ifndef HAVE_SYMLINK
+ if (dbpath != NULL)
elog(ERROR, "CREATE DATABASE: may not use an alternate location on this platform");
#endif
@@ -301,7 +301,7 @@ createdb(const CreatedbStmt *stmt)
/* Make the symlink, if needed */
if (alt_loc)
{
-#ifndef WIN32 /* already throws error on WIN32 above */
+#ifdef HAVE_SYMLINK /* already throws error above */
if (symlink(alt_loc, nominal_loc) != 0)
#endif
elog(ERROR, "CREATE DATABASE: could not link '%s' to '%s': %m",