Re: Data directory with trailing [back]slash

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PgSql-Win32 <pgsql-hackers-win32(at)postgresql(dot)org>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Data directory with trailing [back]slash
Date: 2004-07-11 02:57:35
Message-ID: 200407110257.i6B2vZb22729@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches


OK, I have fixed the problem. While your patch got close, it is best to
fix the problem in trim_trailing_separator() rather than above.

Tom already fixed the Unix case by preventing a path of '/' from being
stripped. This patch prevents c:/ and //network/ from being stripped
too. (Tom already mentioned Win32 would need work.)

---------------------------------------------------------------------------

Andrew Dunstan wrote:
>
>
> Tom Lane wrote:
>
> >"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> >
> >
> >>It's not possible to start the postmaster on win32 with:
> >>postmaster -D d:\pgdata\
> >>or
> >>postmaster -D d:/pgdata/
> >>
> >>
> >
> >Sounds like canonicalize_path() needs to be applied a bit sooner than
> >it is.
> >
> >BTW I think canonicalize_path() is a few bricks shy of a load yet:
> >I'm not sure it works well with Windows drive-letters, and it definitely
> >will strip significant slashes when given input like '/' or 'C:\'.
> >Feel free to fix those problems while at it...
> >
> >
>
> Or use the attached patch, which I think does it right.
>
> cheers
>
> andrew

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 1.1 KB

In response to

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Peter Eisentraut 2004-07-11 08:10:34 Re: [PATCHES] Re : Win32 binaries test / pg_dump problem
Previous Message Bruce Momjian 2004-07-11 00:58:00 Re: Re : Win32 binaries test / pg_dump problem

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-07-11 03:13:34 Re: pg_dump --clean w/ <= 7.2 server
Previous Message Bruce Momjian 2004-07-11 01:51:57 Re: Updated ALTER TABLE ... SET TABLESPACE patch