Re: minor: ~ not resolved in psql - Mailing list pgsql-bugs

From Francisco Olarte Sanz
Subject Re: minor: ~ not resolved in psql
Date
Msg-id 200310311046.32816.folarte@peoplecall.com
Whole thread Raw
In response to Re: minor: ~ not resolved in psql  ("Bas Scheffers" <bas@scheffers.net>)
List pgsql-bugs
On Thursday 30 October 2003 19:18, Bas Scheffers wrote:

> > This is not a bug.  If there is not file named ~ then it can't be
> > opened.
> I am not trying to open a file named ~, I am using it as part of a file
> name, ie: ~/ewap/sql/ewap.sql. (where ~=/home/bas) This is perfectly valid
> on any unix system and especialy since tab completion of \i supports it,
> so should the function that does the actual opening of the file, I would
> think...

    It's not valid in a unix system. It's an expansion performed by most shells.
In my system (Linux, bash2):

[patxifijo:~] ls ~/2do.txt
/home/folarte/2do.txt
[patxifijo:~] ls '~/2do.txt'
ls: ~/2do.txt: No such file or directory

In fact it works with all programs:

[patxifijo:~] echo ~/2do.txt
/home/folarte/2do.txt
[patxifijo:~] echo '~/2do.txt'
~/2do.txt

F.O.S.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgtcl large object read/write corrupts binary data
Next
From: Nitz
Date:
Subject: CREATE INDEX spoils IndexScan planns