Thread: Odd psql \i behaviour

Odd psql \i behaviour

From
"Christopher Kings-Lynne"
Date:
What's with this?

current pwd = /home/chriskl

usa=# \i ddlpack/kl_setnotnull.sql   <-- tab completes properly
DROP
CREATE
usa=# \i ~/ddlpack/kl_setnotnull.sql   <-- tab completes properly
~/ddlpack/kl_setnotnull.sql: No such file or directory
usa=#

Chris



Re: Odd psql \i behaviour

From
Peter Eisentraut
Date:
Christopher Kings-Lynne writes:

> usa=# \i ~/ddlpack/kl_setnotnull.sql   <-- tab completes properly
> ~/ddlpack/kl_setnotnull.sql: No such file or directory

The tilde is only meaningful in bash (or some other shell).

Try putting this in your .inputrc:

$if psql
set expand-tilde on
$endif

That will expand the tilde when you press TAB.

-- 
Peter Eisentraut   peter_e@gmx.net