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

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Re [HACKERS]: Still not happy with psql's multiline history behavior
Date: 2006-06-05 03:55:29
Message-ID: 200606050355.k553tTW19099@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Sergey E. Koposov wrote:
> On Sun, 4 Jun 2006, Bruce Momjian wrote:
> 
> > Sergey E. Koposov wrote:
> >> Hello,
> >>
> >> I'm sending the patch fixing the \r bug:
> >
> > Funny, I just applied a simpler fix for the \r bug.  Please review it.
> > Thanks.
> >
> 
> It is simpler, because it behaves differently.
> Your patch for the case:
> wsdb=# select 
> wsdb-# \r
> Query buffer reset (cleared).
> 
> puts in the history two elements ("\r" and "select")
> 
> Mine puts only "\r", just because 
> <quote>  \r             reset (clear) the query buffer</quote>
> and I think that's reasonable, but I don't insist...

I think I like the fact there two separate entries, so we are OK.

> > I am confused by the \e bug.  I just tried 8.1.X and it seems to behave
> > the same as CVS HEAD.  What exactly should it do?
> >
> 
> It is not actually a bug, I think it's a Tom's habit. 
> In 8.1.x if  you type for example  in the editor "select 1+" and exit from
> it, the "select 1+" string will be already in the history. But in CVS HEAD
> it will be saved internally, but it won't be shown in the history until the
> user finishes the command with ';'. And there is really no need for
> correcting that, I think.

Thanks, that was clear.  The attached patch fixes it.  It is a little
larger than usual because I changed the name of the boolean and reversed
its usage.  It now works like it did in 8.1.X.

-- 
  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 (2.7 KB)

In response to

pgsql-hackers by date

Next:From: ITAGAKI TakahiroDate: 2006-06-05 09:17:45
Subject: Re: bgwriter statistics
Previous:From: Zoltan BoszormenyiDate: 2006-06-04 22:32:38
Subject: Re: psql -A (unaligned format) eats too much memory

pgsql-patches by date

Next:From: Bruce MomjianDate: 2006-06-05 04:27:04
Subject: Re: Re [HACKERS]: Still not happy with psql's multiline history behavior
Previous:From: Sergey E. KoposovDate: 2006-06-04 04:57:12
Subject: Re: Re [HACKERS]: Still not happy with psql's multiline history

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