Re: Fwd: psql include file using relative path - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Fwd: psql include file using relative path
Date
Msg-id 4D784063.8040306@dunslane.net
Whole thread Raw
In response to Re: Fwd: psql include file using relative path  (Gurjeet Singh <singh.gurjeet@gmail.com>)
Responses Re: Fwd: psql include file using relative path
List 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


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: How should the waiting backends behave in sync rep?
Next
From: Gurjeet Singh
Date:
Subject: Re: Fwd: psql include file using relative path