Disable alternate locations on Win32

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Disable alternate locations on Win32
Дата
Msg-id 200305040443.h444hRi27832@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: Disable alternate locations on Win32  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
The following patch disables alternate locations on Win32 because it
doesn't have symlinks.
--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/commands/dbcommands.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/commands/dbcommands.c,v
retrieving revision 1.112
diff -c -c -r1.112 dbcommands.c
*** src/backend/commands/dbcommands.c    4 Apr 2003 20:42:12 -0000    1.112
--- src/backend/commands/dbcommands.c    4 May 2003 04:32:59 -0000
***************
*** 174,179 ****
--- 174,184 ----
      /* don't call this in a transaction block */
      PreventTransactionChain((void *) stmt, "CREATE DATABASE");

+ #ifdef WIN32
+     if (dbpath != NULL)    /* platform has no symlinks */
+         elog(ERROR, "CREATE DATABASE: may not use an alternate location on this platform");
+ #endif
+
      /*
       * Check for db name conflict.    There is a race condition here, since
       * another backend could create the same DB name before we commit.
***************
*** 296,302 ****
--- 301,309 ----
      /* Make the symlink, if needed */
      if (alt_loc)
      {
+ #ifndef WIN32    /* already throws error on WIN32 above */
          if (symlink(alt_loc, nominal_loc) != 0)
+ #endif
              elog(ERROR, "CREATE DATABASE: could not link '%s' to '%s': %m",
                   nominal_loc, alt_loc);
      }

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bradley Baetz
Дата:
Сообщение: Re: apply outer->inner join optimisation to OR clauses
Следующее
От: Joe Conway
Дата:
Сообщение: Re: contrib/tablefunc bugfix