Re: Making pgxs builds work with a relocated installation

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>, "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Making pgxs builds work with a relocated installation
Date: 2005-09-28 12:43:22
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4CC2F76@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 27 September 2005 18:57
> To: Magnus Hagander
> Cc: Dave Page; Peter Eisentraut; pgsql-hackers(at)postgresql(dot)org
> Subject: Re: [HACKERS] Making pgxs builds work with a
> relocated installation
>
> "Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> > Using GetShortPathName() will break on any system that has disabled
> > short filename generatino, which IIRC is a recommended best practice
> > both for performance and for security in legacy apps. I
> don't know what
> > it does, but probably it will just return the same long path again.
>
> Yuck. Anyone have another idea on coping with space-containing
> pathnames? I suppose we could try to quote the path
> variables properly
> in all the makefiles, but that sure seems like a painful proposition.

Actually it seems to work quite nicely - on Windows 2000 with short
names disabled it generates paths like:

C:\PROGRA~1\PostgreSQL\8.1-beta2\bin

Ie, it still fixes the spaces, but leaves the long bits, umm, long. With
short names enabled (on XP), you get:

C:\PROGRA~1\POSTGR~1\827E4~1.1-B\bin

Which is truly hideous, but works as expected in cmd.exe and Msys.

Patch attached that does this, and doubles up on the backslashes to keep
msys/make happy. Cmd.exe doesn't seem to care about the double
backslashes.

Regards, Dave

Attachment Content-Type Size
pg_config c.diff application/octet-stream 4.6 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-28 13:15:54 Re: Making pgxs builds work with a relocated installation
Previous Message Dmitry Karasik 2005-09-28 12:36:04 execution of prepared statements leaks memory

Browse pgsql-patches by date

  From Date Subject
Next Message Pavel Stehule 2005-09-28 14:30:54 SQL/XML publishing function experimental patch II
Previous Message Tom Lane 2005-09-28 04:14:19 Re: Proposed p.tch for sequence-renaming problems