Re: psql possible TODO

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Harris <lists(at)spuddy(dot)org>, "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql possible TODO
Date: 2006-12-05 22:46:54
Message-ID: 1165358814.31648.89.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2006-12-05 at 17:34 -0500, Tom Lane wrote:
> Stephen Harris <lists(at)spuddy(dot)org> writes:
> > Silly: You could even do \r xyz and load the buffer with the last line
> > beginning xyz
>
> We've got that: control-R xyz.
>
> The thing I'm having a hard time with here is the notion that command
> number is a convenient way of identifying prior commands. It seems like
> an idea that should have gone out with punched cards.

Imagine that you are profiling 50 queries, the queries are all the same
except for varying where clauses or joins.

Perhaps you are building out a query that contains 50 joins, and you are
building one step at a time (which I do ALL the time). You get to join
47 and realize that your data set isn't right.

Now, there is a chance that query 46 is the query that I want, but
ooops, I have 3 syntax errors so now it is actually query 43. How do I
get back to 43?

I ctrl-r... which really doesn't seem useful in this sense.
I \s and copy and paste? Even worse and what I do now.

Or... I \s and hit !46 (or whatever the ! becomes).

!46 seems awful easy to me.

Worse yet... what if it is actually query 27 because I got distracted by
a support question over jabber from the customer I am actually working
on and I need to help him profile a query for a couple of minutes?

Sincerely,

Joshua D. Drake

>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
--

=== 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 Dave Page 2006-12-05 22:47:34 Re: Source directory
Previous Message Bruce Momjian 2006-12-05 22:45:13 Re: psql possible TODO