Re: A Small psql Suggestion

From: Raymond Brinzer <ray(dot)brinzer(at)gmail(dot)com>
To: depesz(at)depesz(dot)com
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: A Small psql Suggestion
Date: 2023-02-07 16:44:54
Message-ID: CANasJH=Ukcb4N=O_MFpjbVoWnJTSC7gjtRjhCRq=hSjn==yrqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I was really busy with work last week, so I didn't get around to thanking
you, depesz. Setting d is a clever trick which hadn't occurred to me, and
it has indeed made things nicer for me.

I do think it would be a good thing to actually change in psql
nevertheless, since I think the suggested behavior is better most of the
time, especially if all or most of your tables have sequences. The
built-in ability to work around it (to a good approximation of the desired
behavior) certainly does diminish the importance of the issue, though such
a solution won't be obvious to most people.

Again, though, my thanks. This has been like a rough spot on the handle of
a tool: trivial for occasional use, prone to raise a blister over
thousands of repetitions.

On Wed, Feb 1, 2023 at 11:04 AM hubert depesz lubaczewski <depesz(at)depesz(dot)com>
wrote:

> On Tue, Jan 31, 2023 at 11:17:16AM -0500, Raymond Brinzer wrote:
> > Greetings,
> >
> > There is (for me) a small speed bump in psql. I think it's worth
> > mentioning, minor though it is, because psql is such a polished tool
> > generally, and because it's something which affects me many, many times a
> > day.
> >
> > As it is, \d is a shortcut for \dtmvs. What I actually want to see, on a
> > regular basis, are my relations: \dtmv. Most of the time, the sequences
> > are clutter. If my habits are like most people's in this (and I suspect
> > they are), excluding sequences from \d would optimize for the common
> case.
>
> Perhaps just add this yourself?
> \set d '\\dtmv'
> and then
> :d
>
> or just bind \dtmv to some key like f1 or something like this?
>
> Best regards,
>
> depesz
>
>

--
Ray Brinzer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2023-02-07 18:40:13 Re: ALTER COLUMN to change GENERATED ALWAYS AS expression?
Previous Message Andrey Borodin 2023-02-07 16:24:44 Re: Too coarse predicate locks granularity for B+ tree indexes