Re: Can't change working directory to C:/Documents and Settings in Windows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jorge Godoy <jgodoy(at)gmail(dot)com>
Cc: Casey Crosbie <casey(dot)crosbie(at)noaa(dot)gov>, pgsql-general(at)postgresql(dot)org
Subject: Re: Can't change working directory to C:/Documents and Settings in Windows
Date: 2007-07-02 02:12:35
Message-ID: 20311.1183342355@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jorge Godoy <jgodoy(at)gmail(dot)com> writes:
> On Sunday 01 July 2007 22:25:24 Casey Crosbie wrote:
>> Jorge,
>> Thanks for the suggestion. But unfortunately, I tried both
>> \cd "C:/Document~1" and just \cd C:/"Document~1" and neither worked.

> Sorry. It should be up to 8 chars: "Docume~1" or some variation like that
> (I've seen ~2 due to some unknown reason). This looks like a Windows
> problem on finding directories with spaces in its name. The same happens
> with diacriticals...

FWIW, on a Unix machine I get

$ mkdir "foo bar"
$ psql regression
Welcome to psql 8.2.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

regression=# \cd foo bar
\cd: could not change directory to "foo": No such file or directory
regression=# \cd "foo bar"
\cd: could not change directory to ""foo bar"": No such file or directory
regression=# \cd 'foo bar'
regression=# \!pwd
/home/tgl/pgsql/foo bar
regression=#

So maybe single quotes would work better.

I'm not sure if the behavior with double quotes should be considered a
bug or not. Too lazy to check the manual, but I believe psql thinks
single and double quotes are different.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-07-02 02:15:42 Re: shmctl EIDRM preventing startup
Previous Message Tom Lane 2007-07-02 02:06:58 Re: shmctl EIDRM preventing startup