Re: A tiny improvement of psql - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: A tiny improvement of psql
Date
Msg-id CAGECzQTeDak7Q1M1Eb_wr9M=BJuRove7+Gcym861Zgc8RxJKQQ@mail.gmail.com
Whole thread Raw
In response to Re: A tiny improvement of psql  (Vik Fearing <vik@postgresfriends.org>)
List pgsql-hackers
On Tue, 26 Dec 2023 at 22:45, Vik Fearing <vik@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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Fix Brin Private Spool Initialization (src/backend/access/brin/brin.c)
Next
From: Alexander Cheshev
Date:
Subject: Multidimensional Histograms