Re: proposal: alternative psql commands quit and exit

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: proposal: alternative psql commands quit and exit
Дата
Msg-id CA+TgmoZc1OYsPdsQCRbjV3M7jNkF--2NmHU4mdf9cuQW0JVLoQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: alternative psql commands quit and exit  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: proposal: alternative psql commands quit and exit
Re: proposal: alternative psql commands quit and exit
Re: proposal: alternative psql commands quit and exit
Список pgsql-hackers
On Mon, Jan 15, 2018 at 7:28 AM, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> Everaldo Canuto wrote:
>> Also I don't see a consensus on this thread and I don't understand how decisions are taken.
>
> It's just difficult to find consensus with many people.
>
> There were several valid concerns with this, the most striking (to me)
> was Tome's concern that there are perfectly valid multi-line SQL statements
> where a line could start with "exit" or "quit".
>
> Robert Haas had an idea how to provide useful hints without breaking anything,
> but it seemed a little complicated.

It's not really that complicated.  Here's a patch.  This follows what
Tom suggested in http://postgr.es/m/30157.1513058300@sss.pgh.pa.us and
what I suggested in
https://www.postgresql.org/message-id/CA%2BTgmoZswp00PtcgPfQ9zbbh7HUTgsLLJ9Z1x9E2s8Y7ep048g%40mail.gmail.com

I've discovered one thing about this design that is not so good, which
is that if you open a single, double, or dollar quote, then the
instructions that are provided under that design do not work:

rhaas=# select $$
rhaas$# quit
Use \q to quit or press control-C to clear the input buffer.
rhaas$# \q
rhaas$# well this sucks
rhaas$#

Obviously this leaves something to be desired, but I think it's
probably just a matter of rephrasing the hint somehow.  I didn't have
a good idea off-hand though, so here's the patch as I have it.

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

Вложения

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

Предыдущее
От: Shubham Barai
Дата:
Сообщение: Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patchfor hash index
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Rangejoin rebased