Re: A tiny improvement of psql

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Vik Fearing <vik(at)postgresfriends(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Wang <kevinpgcloud(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: A tiny improvement of psql
Date: 2023-12-26 23:33:38
Message-ID: CAGECzQTeDak7Q1M1Eb_wr9M=BJuRove7+Gcym861Zgc8RxJKQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 26 Dec 2023 at 22:45, Vik Fearing <vik(at)postgresfriends(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Cheshev 2023-12-27 00:13:25 Multidimensional Histograms
Previous Message Tomas Vondra 2023-12-26 22:07:09 Re: Fix Brin Private Spool Initialization (src/backend/access/brin/brin.c)