Re: psql possible TODO - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Re: psql possible TODO
Date
Msg-id 1165353184.31648.53.camel@localhost.localdomain
Whole thread Raw
In response to Re: psql possible TODO  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql possible TODO
Re: psql possible TODO
List pgsql-hackers
> > 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?

Well I didn't forget, but I assumed we could use the psql parser to
handle the \^\*\![0-9] (that is likely not the correct regex).

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

I wouldn't assume that we would be taking it away. The only difference
is that at \^ there would be a number. I am not sure how that effects
anyone using \s anyway since \s picks up all errors etc...

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

If you mean control-P as in "paste" then I would say... get your hands
off the mouse. The mouse is counter productive and it is faster to do
this:

=> \s
76 SELECT * FROM Foo;
=> !76

Just like bash. I certainly don't have a problem with uses different
characters or the like and am open to any suggestion thereof. The reason
I picked ! was because it is what bash uses. The reason I picked !@ is
because they are right next to each other.

Sincerely,

Joshua D. Drake


> 
>             regards, tom lane
> 
-- 
     === 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





pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)
Next
From: Tom Lane
Date:
Subject: Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)