Re: \prompt for psql

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: \prompt for psql
Дата
Msg-id 200702181820.59869.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: \prompt for psql  ("Chad Wagner" <chad.wagner@gmail.com>)
Список pgsql-patches
Chad Wagner wrote:
> 1. if pset.notty is set and '-f' switch is not set then use
> simple_prompt -- deals with SQL script redirection case and '-f' is
> not used, and not interactive
> 2. else then use gets_fromFile(stdin) <or some other alternative?>
> (read from stdin)

That seems a bit too complicated.  Programs generally shouldn't behave
differently depending on whether stdin or stdout are redirected.

I was just raising the point because the shell command "read" reads from
stdin and is quite useful noninteractively.  I'm not sure, however,
that the proposed \prompt command has much use in that regard.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: further bootstrap cleanup
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: patch for contrib/xml2