Fix CreateTableSpace() so it will compile without HAVE_SYMLINK.
authorTom Lane
Sat, 5 Sep 2015 20:15:38 +0000 (16:15 -0400)
committerTom Lane
Sat, 5 Sep 2015 20:16:02 +0000 (16:16 -0400)
This has been broken since 9.3 (commit 82b1b213cad3a69c to be exact),
which suggests that nobody is any longer using a Windows build system that
doesn't provide a symlink emulation.  Still, it's wrong on its own terms,
so repair.

YUriy Zhuravlev

src/backend/commands/tablespace.c

index 01ba326a43b23900c32ed8c4ad5c549e42e35059..44aa05ed23f7edaf714d19974e85ff3fe4e6b262 100644 (file)
@@ -366,13 +366,14 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
 
    /* We keep the lock on pg_tablespace until commit */
    heap_close(rel, NoLock);
+
+   return tablespaceoid;
 #else                          /* !HAVE_SYMLINK */
    ereport(ERROR,
            (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
             errmsg("tablespaces are not supported on this platform")));
+   return InvalidOid;          /* keep compiler quiet */
 #endif   /* HAVE_SYMLINK */
-
-   return tablespaceoid;
 }
 
 /*