Re: Fwd: psql include file using relative path

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Fwd: psql include file using relative path
Дата
Msg-id AANLkTimZpATipV2zZ=UWqHxwzz0015nX0O7v5H5ww20F@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fwd: psql include file using relative path  (David Fetter <david@fetter.org>)
Ответы Re: Fwd: psql include file using relative path  (David Fetter <david@fetter.org>)
Список pgsql-hackers
On Wed, Mar 9, 2011 at 7:32 PM, David Fetter <david@fetter.org> wrote:
> On Wed, Mar 09, 2011 at 07:05:19PM -0500, Gurjeet Singh wrote:
>> Good question, I hadn't thought of that either, and thinking about
>> it a bit I think we'd want to keep the current behaviour of \i and
>> provide new behaviour using a new command.
>>
>> Say when we are processing a pretty nested file after multiple \ir
>> commands, a \i <relative path file> in any of those files should
>> look for that file in psql's CWD/PWD. That is what the user expects
>> from \i command currently and I don't think it'd be desirable to
>> break that assumption.
>
> I'm not sure I understand.  Stuff that worked before would still work.
>
> Should stuff break when it has a legitimately accessible path in it
> just because that path is relative?

You're confused.  The point is whether the path is relative to PWD or
to the directory in which the currently executing script is located.
If you want to allow people to get either interpretation, you need two
commands.

In interactive use, I believe there's no difference between the two.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Header comments in the recently added files
Следующее
От: Itagaki Takahiro
Дата:
Сообщение: Re: Header comments in the recently added files