Re: psql possible TODO

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql possible TODO
Date: 2006-12-05 22:10:44
Message-ID: 1165356644.31648.68.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > > Just like bash.
> >
> > What we have is just like bash --- at least the parts of it that I use.
>
> This reminds me of the old csh function where you could recall things by
> numbers and do search/replace on them. The capability was so hard to
> use I could imagine anyone _normal_ using it.

Except that this has nothing to do with that. This is *standard* feature
set for the unix shell:

794 scp admin(at)compile(dot)commandprompt(dot)com:pgdump* .
795 scp admin(at)compile(dot)commandprompt(dot)com:*bench* .
796 joe pgbench.results
797 ps a-x
798 ps -ax
799 bin/psql -U jd -p5500 bench
800 bin/psql -U jd -p5501 bench
801 bin/pg_ctl -D slave0 stop
802 bin/pg_ctl -D slave1 stop
803 joe bin/starttest.sh
804 history
805 joe bin/starttest.sh
806 history

Oh... that's right, its call starttest.sh:

!805

Except for PostgreSQL it would be:

postgres=# \s

1 SELECT * from cmd_pg_stat_all_tables ;
2 SELECT count(*) from cmd_pg_stat_all_tables ;
3 SELECT count(*) from cmd_pg_stat_database;

postgres=# !1

Otherwise I either have to copy and paste what is 1 or I have to do a
ctrl-r. So now i have done a \s to see what queries are in the buffer
and then I am doing a ctrl-r to get the info out of the buffer. That's
silly. When if there was a number associated, I could just execute
whatever I need.

I am regularly in 100 different catalogs a week, I can't always remember
what is going on from one to the other. I use \s all the time to help
with this. Eliminating the need for a mouse or to cycle through ctrl-r
would make this alot easier.

Don't get me wrong, ctrl-r is great, but it is not an end all :)

Sincerely,

Joshua D. Drake

>
--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-12-05 22:11:20 Re: psql possible TODO
Previous Message Stephen Harris 2006-12-05 22:08:16 Re: psql possible TODO