Re: psql \i handling ~ in specified file name

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Zach Irmen <zirmen(at)shaw(dot)ca>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: psql \i handling ~ in specified file name
Date: 2004-01-08 17:39:28
Message-ID: 200401081739.i08HdSu03874@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Zach Irmen wrote:
> "Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
> > Zach Irmen said:
> > > Can I just ifndef WIN32 and not think about it? I'm not sure how that
> > > would work either.
> > >
> >
> > If we are going to have a Windows port I don't think we should treat it as
> > a poor cousin.
>
> I guess I was thinking more about if it should be done as opposed to how it
> would be done. On the one hand, I think '~' by itself has no meaning in a
> normal Windows environment, so why should psql on Windows give it one? The
> readline library on unix, which can be used by psql, interprets the tilde
> and is the big reason why psql on unix should interpret the tilde as well.
> On the other hand however, I can see consistency being important in that
> giving '~' a meaning in psql should give it the same meaning regardless of
> platform.

As I remember, MSDOS uses the "~" to specify short versions of long file
names. I think that is enough for us to say that we are best leaving
'~' expansion only for Unix. We already dump COPY in a native Win32
format, so it seems we should handle special characters in a similar
native way.

I will add a comment to this affect in the source code.

--
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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Joshua D. Drake 2004-01-08 18:02:08 Re: psql \i handling ~ in specified file name
Previous Message Bruce Momjian 2004-01-08 16:53:53 Re: SIGPIPE handling