Re: Fix initdb for path with whitespace and at char

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Nikhil Deshpande <nikhail(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix initdb for path with whitespace and at char
Date: 2014-04-30 04:39:42
Message-ID: CAA4eK1Kdp=F7o_JZYa8y6a2uGPS51FdPaxExFHutqdT+fbdo6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 30, 2014 at 3:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
>> This looks correct to me. popen() requires SYSTEMQUOTEs on Windows, like
>> system() does.

It seems right now SYSTEMQUOTE is used before popen both for
Windows and non-Windows, ex. adjust_data_dir() in pg_ctl.c

> We might forget to use the wrapper function too, if it has a nonstandard
> name, no? A better idea would be to redefine popen() and system() on
> Windows. It looks like we're already using a #define to redefine popen().

Won't defining variant of popen just for Windows to add SYSTEMQUOTE
effect such (where currently it is used for both win and non-winows)
usage? Also, I think we might want to remove use of SYSTEMQUOTE
before popen calls where ever it is currently used to avoid usage of the
same two times.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-30 04:42:12 Re: Fix initdb for path with whitespace and at char
Previous Message Tom Lane 2014-04-30 00:05:44 Re: pg_get_viewdefs() indentation considered harmful