Re: pg_upgrade del/rmdir path fix - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_upgrade del/rmdir path fix
Date
Msg-id 23398.1346700151@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_upgrade del/rmdir path fix  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_upgrade del/rmdir path fix
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: [WIP PATCH] for Performance Improvement in Buffer Management
Next
From: Tom Lane
Date:
Subject: Re: Multiple setup steps for isolation tests