Re: psql possible TODO - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql possible TODO
Date
Msg-id 11050.1165352494@sss.pgh.pa.us
Whole thread Raw
In response to psql possible TODO  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: psql possible TODO
List pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
> Hello,
> A reasonable simple feature we were thinking about sponsoring was an
> addition to psql. Currently if you perform a \s within psql it gives
> you the query buffer. My suggestion is that \s give us a execution
> number, similar to bash. Thus at a psql prompt we could do:

> foo=> !76

> And it would execute whatever query was number 76. Secondly:

> foo=> !!76

> Would execute an explain on whatever query was 76. Lastly:

> foo=> !@76

> Would execute an explain analyze within a transaction and a rollback (so
> we could do updates/deletes).

Surely you must use backslash commands for this.  Or had you forgotten
that ! and @ are legal operator characters in Postgres?

Also, you can't take away the existing functionality of \s.  Invent some
other command instead.

But lastly, do we need this at all?  It seems like a relatively awkward,
highly error-prone way to do what you can do today with control-P and
re-execute.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: psql possible TODO
Next
From: "Simon Riggs"
Date:
Subject: Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)