Re: psql possible TODO

Поиск
Список
Период
Сортировка
От Jeremy Drake
Тема Re: psql possible TODO
Дата
Msg-id Pine.BSO.4.64.0612051504300.28611@resin.csoft.net
обсуждение исходный текст
Ответ на Re: psql possible TODO  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-hackers
On Tue, 5 Dec 2006, Joshua D. Drake wrote:

>
> > > > 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:
>
>   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
>

Make sure if you do this you support the other variant.  Ie, in bash
instead of !806 you could have said !-2, which is execute the second to
last command.

And how about
$ ls *.foo
...
$ ^ls^rm

?

:)

>
> Sincerely,
>
> Joshua D. Drake
>
>
>
>
> >
>

-- 
Economics is extremely useful as a form of employment for economists.    -- John Kenneth Galbraith


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: psql possible TODO
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql possible TODO