From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Francisco Olarte <folarte(at)peoplecall(dot)com>, Dmitry Shalashov <skaurus(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pasting a lot of commands to psql |
Date: | 2016-07-08 17:03:48 |
Message-ID: | 20160708170348.GA727986@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> Francisco Olarte <folarte(at)peoplecall(dot)com> writes:
> > On Thu, Jul 7, 2016 at 8:18 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> >> I've wished sometimes for a "\set READLINE off" psql metacommand for
> >> this kind of thing. It's pretty annoying when the text being pasted
> >> contains tabs and readline uses to do completion.
>
> > Doesn't 'cat | psql ' disable it?
>
> Sure, but you could as well use 'psql -n'. I think the point is to be
> able to turn it on and off without starting a fresh session. (Admittedly,
> maybe there's not a lot of usability gain there.)
If your command line already connected to the correct server/database,
with the correct login role, then yeah you can do that. If you have to
switch role (say the role that runs the commands is not a login role),
it's not so convenient to disconnect and launch a new psql.
Now of course this not a huge new feature, but a usability improvement
only -- but psql is full of small usability features and they make it a
pleasure to use.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Tilles - NOAA Federal | 2016-07-08 18:52:59 | RHEL 7 |
Previous Message | Pavel Stehule | 2016-07-08 16:57:45 | Re: Memory usage per session |