| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
| Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: Disable alternate locations on Win32 |
| Date: | 2003-05-04 14:05:30 |
| Message-ID: | 27585.1052057130@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-05-04 14:27:28 | Re: apply outer->inner join optimisation to OR clauses |
| Previous Message | Joe Conway | 2003-05-04 06:14:23 | Re: contrib/tablefunc bugfix |