Re: [BUGS] psql history and "-- lines" - Mailing list pgsql-bugs

From Дилян Палаузов
Subject Re: [BUGS] psql history and "-- lines"
Date
Msg-id 13522a02-1e1e-ef0c-2dd3-e6b532f5ac87@aegee.org
Whole thread Raw
In response to Re: [BUGS] psql history and "-- lines"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hello,

if there is no consensus, on whether --lines should substitute a 
separate entry in the history, then make it an .psqlrc/CLI option.

For psql/HISTSIZE, please update the documentation to state, that 
HISTSIZE -1 disables the file truncation.

About the concerns with rl_variable_bind("comment-begin", "--") 
regarding libreadline/libedit versions: you can put the change only on 
master and announce it for Pg10.  If nobody objects within a year, this 
can be backported.

Greetings  Дилян

On 05/07/2017 01:17 AM, Tom Lane wrote:
> Дилян Палаузов <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 psql
>     set 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 by date:

Previous
From: Дилян Палаузов
Date:
Subject: Re: [BUGS] psql history and "-- lines"
Next
From: Дилян Палаузов
Date:
Subject: Re: [BUGS] Postgresql and Clang Static Analyzer