I wrote:
> Peter Eisentraut <pete...@gmx.net> writes:
>> As a secondary point, we have so far used mostly single quotes for
>> quoting the installation directories, in case someone wants to try other
>> funny characters besides spaces.  The most recent patch uses double
>> quotes.  I'm not sure what degree of support we want to achieve there.

> Oh, hm, I had noted double quotes in the one place that wasn't broken in
> test/regress/Makefile, and followed that precedent.  But you're probably
> right that single quotes would be better, since that would prevent funny
> business from $ characters for instance.  We're not going to be able to
> make both types of quote characters safe, unless gmake has some quoting
> function I'm not aware of (which is surely possible).

I changed the places I'd modified yesterday to use single quotes not
double, and fixed a couple other spots in passing to do the same.
However, I don't see any simple way to deal with the places where we
are sticking paths into C-string constants, to wit in building pg_config
and pg_config_paths.h.  pg_config in particular is nasty because there
are pretty much guaranteed to be single quotes in the value we want for
VAL_LDFLAGS (because of rpath...).  So at the moment, we're not really
safe against single *or* double quotes, nor dollar signs, in
installation paths.  About the only good thing to be said about it is
that these characters are so troublesome that Unix users are unlikely
to use them in directory names anyway.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to