Re: proposal: alternative psql commands quit and exit

Поиск
Список
Период
Сортировка
От Geoff Winkless
Тема Re: proposal: alternative psql commands quit and exit
Дата
Msg-id CAEzk6feWvBc8qAw=3pPTdQ5AwkW0DynbE95fzk+s9py3bvWoNA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: alternative psql commands quit and exit  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: proposal: alternative psql commands quit and exit
Список pgsql-hackers
On 15 January 2018 at 17:03, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Geoff Winkless <pgsqladmin@geoff.dj> writes:
>> And while trying to find the EOF setting in libreadline might get
>> messy, you're already assuming that ctrl-C hasn't been knobbled using
>> stty intr. Unless you want to go searching for that too?
>
> Yeah, that's why I personally don't want to mention ctrl-C in this
> message.  If we do mention it we're going to need to look up what
> the signal is really bound to.

Could always rewrite gets_interactive to implement the documented
"alternative interface" to readline

https://tiswww.cwru.edu/php/chet/readline/readline.html#SEC43

and force exit that way by intercepting Ctrl-D at the character level.
That does feel a bit (!) wrong though, and I'm not sure how difficult
it gets with different locales etc. Would also have to modify
gets_fromFile, in case readline was disabled.

At this point it depends quite how far down the rabbit-hole you want
to go to stop people googling "how do I exit psql", I suppose :p

Geoff


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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] proposal: psql command \graw
Следующее
От: Pavel Stehule
Дата:
Сообщение: polymorphic parameters limits - correct solution?