Odd psql \i behaviour

Started by Christopher Kings-Lynnealmost 24 years ago2 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

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

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Christopher Kings-Lynne (#1)
Re: Odd psql \i behaviour

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