Re: psql: Allow editing query results with \gedit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Christoph Berg <myon(at)debian(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql: Allow editing query results with \gedit
Date: 2024-01-22 18:04:40
Message-ID: 3798850.1705946680@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> I would have forms like FoxPro, I would have a grid like FoxPro, but not in
> psql, and I would not develop it :-)

Yeah, that's something that was also bothering me, but I failed to
put my finger on it. "Here's some JSON, edit it, and don't forget
to keep the quoting correct" does not strike me as a user-friendly
way to adjust data content. A spreadsheet-like display where you
can change data within cells seems like a far better API, although
I don't want to write that either.

This kind of API would not readily support INSERT or DELETE cases, but
TBH I think that's better anyway --- you're adding too much ambiguity
in pursuit of a very secondary use-case. The stated complaint was
"it's too hard to build UPDATE commands", which I can sympathize with.

(BTW, I wonder how much of this already exists in pgAdmin.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-22 18:22:58 Re: Permute underscore separated components of columns before fuzzy matching
Previous Message Tom Lane 2024-01-22 17:57:41 Re: Teach predtest about IS [NOT] <boolean> proofs