Re: [BUGS] psql history and "-- lines"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] psql history and "-- lines"
Дата
Msg-id 7127.1494112662@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] psql history and "-- lines"  (Дилян Палаузов<dpa-postgres@aegee.org>)
Ответы Re: [BUGS] psql history and "-- lines"  (Дилян Палаузов<dpa-postgres@aegee.org>)
Re: [BUGS] psql history and "-- lines"  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-bugs
Дилян Палаузов <dpa-postgres@aegee.org> writes:
> I expect that psql and the shell, e.g. bash, behave in the same way in
> regards to history logs and until-the-current-line comments.

I do not think that the shell necessarily provides a gold-plated precedent
for us to follow.  The language syntax it's dealing with is substantially
different from SQL.  Even ignoring that point, there are a lot of shell
implementations with a lot of different interactive behaviors; who's to
say that bash is the one true way?

> +               rl_variable_bind("comment-begin", "--");

Interesting thought, but IIUC that's a setting that would be better left
to the user's ~/.inputrc, or might indeed override something he's put
there.  I'm also dubious how well it works across all the versions of
readline and libedit that are out there.

Perhaps we could document suggested settings for people to put into
~/.inputrc:
$if psqlset comment-begin "-- "... other things?$endif

        regards, tom lane


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Дилян Палаузов
Дата:
Сообщение: Re: [BUGS] Postgresql and Clang Static Analyzer
Следующее
От: Дилян Палаузов
Дата:
Сообщение: Re: [BUGS] psql history and "-- lines"