Re: Disable alternate locations on Win32

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disable alternate locations on Win32
Дата
Msg-id 27585.1052057130@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Disable alternate locations on Win32  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Disable alternate locations on Win32  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> The following patch disables alternate locations on Win32 because it
> doesn't have symlinks.

Why not do it with one ifdef in one place?

***************
*** 296,302 ****
--- 301,309 ----
      /* Make the symlink, if needed */
      if (alt_loc)
      {
+ #ifndef WIN32
          if (symlink(alt_loc, nominal_loc) != 0)
              elog(ERROR, "CREATE DATABASE: could not link '%s' to '%s': %m",
                   nominal_loc, alt_loc);
+ #else
+         elog(ERROR, "CREATE DATABASE: may not use an alternate location on this platform");
+ #endif
      }

Also I wonder if this shouldn't be conditionalized on something like
HAVE_SYMLINKS rather than a hardwired platform check.

            regards, tom lane


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

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