From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_upgrade del/rmdir path fix |
Date: | 2012-09-03 20:14:44 |
Message-ID: | 50450FB4.9000305@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 09/03/2012 03:22 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> This time with a patch.
> Nitpicky gripe: "fix_path" is a mighty generic name. How about
> "fix_path_for_windows" or something like that? I don't think I'd
> mark it inline, either.
>
> More generally, the behavior of combining two (maybe) filename segments
> seems overcomplicated and unnecessary. Why not just have it take *one*
> argument and back-slashify that, without the concatenation behavior?
> Then you'd have two calls instead of one at some of the call sites,
> but that doesn't seem like much of a loss. The malloc'd strings are
> getting leaked anyway. The function itself would reduce to pg_strdup
> and a backslashification loop. Also, you could turn it into a complete
> no-op (not even pg_strdup) on non-Windows.
>
>
OK, revised patch attached.
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
pg_upgrade_fix_path_separator.patch | text/x-patch | 3.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-09-03 20:23:52 | Re: Proof of concept: standalone backend with full FE/BE protocol |
Previous Message | Tom Lane | 2012-09-03 19:47:20 | Re: Multiple setup steps for isolation tests |