Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Still not happy with psql's multiline history behavior

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Still not happy with psql's multiline history behavior
Date: 2006-06-04 04:36:38
Message-ID: 200606040436.k544acC01227@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
I think I have fixed both problems with the attached, applied patch. 
Please let me know if it is OK.

---------------------------------------------------------------------------

Tom Lane wrote:
> I'm getting grudgingly more used to CVS HEAD's behavior of stuffing a
> multiline command into the history buffer as a single item, but there's
> still something bothering me about it.  I've finally put my finger on
> what.  I think it should not combine SQL text and backslash commands
> into a single history entry.  The example that seriously sucks is:
> 
> regression=# select foo ...
> regression-# \r
> Query buffer reset (cleared).
> now control-P brings back:
> regression=# select foo ...
> \r
> 
> In the case where I type SQL and backslash on one line, of course it
> can't break them apart, but I think there should be a general rule that
> a line starting with a backslash is always a separate history entry.
> 
> Also, \e is seriously broken: after you edit the text and exit the
> editor, the text is not reloaded into the visible display (although it
> does seem to still be "behind the scenes" somewhere).
> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
> 

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Attachment: /bjm/diff
Description: text/x-diff (924 bytes)

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-06-04 04:45:55
Subject: Re: Re [HACKERS]: Still not happy with psql's multiline history behavior
Previous:From: Sergey E. KoposovDate: 2006-06-04 04:35:59
Subject: Re [HACKERS]: Still not happy with psql's multiline history behavior

pgsql-patches by date

Next:From: Bruce MomjianDate: 2006-06-04 04:45:55
Subject: Re: Re [HACKERS]: Still not happy with psql's multiline history behavior
Previous:From: Sergey E. KoposovDate: 2006-06-04 04:35:59
Subject: Re [HACKERS]: Still not happy with psql's multiline history behavior

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group