On Tue, 26 Dec 2023 at 22:45, Vik Fearing <v...@postgresfriends.org> wrote:
> It is kind of something we control.  Per the psql docs, setting
>
>      HISTCONTROL=ignoredups
>
> will do the trick.

Yeah, the easiest "fix" (that I know of) for a user is to set
HISTCONTROL in ~/.psqlrc to ignoredups using:

\set HISTCONTROL ignoredups

But honestly, I think that should probably be made the default. I
can't really think of a reason who would actually want the current
default of "none". And while we're at it maybe there are some other
defaults in psql that are worth changing. The main ones from my psqlrc
that seem like good defaults for pretty much everyone:

\x auto
\pset linestyle unicode

And maybe fixing the major pitfall I always run into with psql: Having
ON_ERROR_STOP default to on when a script is passed in using -f/--file


Reply via email to