Re: [GENERAL] Patch (tiny): \cd (change dir) for psql [with feedback]

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [GENERAL] Patch (tiny): \cd (change dir) for psql [with feedback]
Дата
Msg-id Pine.LNX.4.30.0103262200100.1114-100000@peter.localdomain
обсуждение исходный текст
Список pgsql-patches
Mark Hamby writes:

> Here's a patch for a \cd (change dir) command in psql program.
> It's very small and only adds a few lines.
> Personally, I am surprised psql does not have this command.
> It is EXTREMELY useful when \include'ing SQL scripts to set
> up a database schema.

This sounds like a good idea.

Problems with your patch:

1. You can't portably use getcwd(NULL, xxx).

2. You should test for !quiet before printing messages to stdout.

3. You should use scan_option() to read command arguments.  See \connect
   above your code (rather than \copy below).

Unless you manage to fix these issues, I will do it. :-)

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Patch (tiny): \cd (change dir) for psql [with feedback]
Следующее
От: Bruce Momjian
Дата:
Сообщение: ODBC indenting