Re: psql and readline comments

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: psql and readline comments
Дата
Msg-id 201901141559.ne4yhv2nwsl5@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: psql and readline comments  (Дилян Палаузов <dpa-postgres@aegee.org>)
Ответы Re: psql and readline comments  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-bugs
On 2019-Jan-13, Дилян Палаузов wrote:

> Hello,

Hello, please don't top-post.

> On Sun, 2019-01-13 at 10:08 -0500, Tom Lane wrote:
>
> > I remain of the opinion that (1) nobody has tested the proposed patch
> > across a range of readline and libedit versions, and (2) this would
> > probably be better addressed by a documentation addition anyway.
> > It's not psql's job to override user-settable readline options.
>
> when the user does not set anything, the presumption is, that the
> system has reasonable defaults.  A reasonable default for
> “comment-begin” is “--”, and not the inherited default “#”.

I agree -- it doesn't make sense to treat the insert-comment command as
inserting a #, which is not a comment for psql.  I use meta-# often in
bash and I'm never happy to have to resort to manually prepending "--"
in psql in order to make the current line a comment instead.  The other
suggested changes in the original thread are of course much more
complicated and would require more research, but this one seems like a
slam-dunk improvement.  

Now you may wish (as I once did) for the whole of the current input
buffer to become a comment instead, but it doesn't work that way in bash
either (only the current line; but then bash doesn't have multiline
comments AFAIK) and I don't think psql needs to do terribly much more
than that.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15592: Memory overuse with subquery containing unnest() and setoperations (11.x regression)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15592: Memory overuse with subquery containing unnest() and set operations (11.x regression)