Re: proposal: alternative psql commands quit and exit

Поиск
Список
Период
Сортировка
От Daniel Vérité
Тема Re: proposal: alternative psql commands quit and exit
Дата
Msg-id ad75eab6-71ea-4e1f-8aa5-68876ff50651@manitou-mail.org
обсуждение исходный текст
Ответ на Re: proposal: alternative psql commands quit and exit  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: proposal: alternative psql commands quit and exit  (Everaldo Canuto <everaldo.canuto@gmail.com>)
Список pgsql-hackers
    Tom Lane wrote:

>  The typical interaction I'd foresee is more like
>
> postgres=> select 2+2                  (user forgets semicolon)
> postgres-> help
> postgres-> quit
> postgres-> exit

A part of this is due to the default PROMPT2 being too similar to PROMPT1.
The significance of '=' turning to '-' is easily lost on newbies.

By comparison, the mysql client seems a bit more intuitive
for this, with this presentation:

mysql> select 2+2
    -> help
    -> quit
    -> exit
The "mysql" part is replaced by spaces on secondary prompts, so
visually it's more obvious that it's a different state.
The space-padding is necessary to keep the user input left-aligned.

Maybe PROMPT2 could be improved in that direction in psql.
For instance, I wonder if it'd be doable to have PROMPT2 with the line
number and proper alignment, so the above session could end up displayed
like this:

postgres=> select 2+2
       2-> help
       3-> quit
       4-> exit

That way, the more lines are typed, the more it becomes obvious that
you're in a multi-line statement. Plus numbering lines might
be useful in general, anyway.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: pgsql: Prohibit identity columns on typed tables and partitions
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Speeding up pg_upgrade