Tom Lane wrote:
>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>Tom Lane wrote:
>>>What would break if we caused get_progname itself to strip the suffix?
>>Yes. get_progname() actually just returns a pointer to one past the last
>>directory separator it finds in its argument string. Having it strip the
>>.exe directly would in effect involve mangling argv. That's what
>>makes me slightly nervous about it. We could have it strdup() the result
>>and then mangle that - note that it is called by postmaster before we
>>set up any memory context stuff.
>Seems reasonable. What I was more worried about though was whether
>there are any callers that actually need a non-stripped result.
Ok, I will have a look. grep tells me it's called in these places:
In response to
pgsql-hackers-win32 by date
|Next:||From: Magnus Hagander||Date: 2004-10-17 15:31:32|
|Subject: Win32 & NLS|
|Previous:||From: Tom Lane||Date: 2004-10-16 16:57:26|
|Subject: Re: get_progname and .exe suffix |