Re: Fwd: psql include file using relative path
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Gurjeet Singh <singh.gurjeet@gmail.com>
Cc: David Fetter <david@fetter.org>, Ibrar Ahmed <ibrar.ahmad@gmail.com>, Robert Haas <robertmhaas@gmail.com>, PGSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2011-03-10T03:07:15Z
Lists: pgsql-hackers
On 03/09/2011 09:36 PM, Gurjeet Singh wrote: > If we folded \ir into \i then what would you want `\i 1.sql` to do? > Read 1.sql from $HOME or the one that is main.sql's sibling. > > > Should stuff break when it has a legitimately accessible path in it > just because that path is relative? > > > Given the above test case, I think it'd be best if we introduced a new > command for this feature. > > I agree there's a good case for the new feature. I think someone mentioned tab completion upthread, and that doesn't make so much sense to me. This only makes sense nested in a script - in fact if it's not called from inside an included script (via -f or \i) it should possibly error out (if it already does this I apologise - I haven't looked at the patch). cheers andrew