Re: psql and readline

From: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Peter Mount <peter(at)retep(dot)org(dot)uk>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql and readline
Date: 2003-02-13 12:50:30
Message-ID: 20030213125030.D9018@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The sad thing is that my readline wrapper for libedit doesn't wrap
replace_history_entry, so I could use readline up until now, the tests
for readline succeed as the functions tested for exist, but

command.o: In function `do_edit':
/usr/src/local/pgsql/src/bin/psql/command.c:1652: undefined reference to `replace_history_entry'

ho hum..

Patrick

On Wed, Feb 12, 2003 at 11:08:16PM -0500, Bruce Momjian wrote:
>
> Patch applied. Thanks.
>
> ---------------------------------------------------------------------------
>
>
> Ross J. Reedstrom wrote:
> > On Fri, Jan 10, 2003 at 11:02:55PM +0100, Peter Eisentraut wrote:
> > > Ross J. Reedstrom writes:
> > >
> > > > I already posted a one-line patch to implement this, but it doesn't
> > > > seem to hve come through to the list. Here it is inline, instead of as
> > > > an attachment:
> > >
> > > We need this to work without readline as well. (Of course there won't be
> > > any history, but it needs to compile.)
> >
> > <blush> Even after slogging my way through the nesting #ifdefs for readline
> > and win32, I forgot! Let's make that a three line patch, then.
> >
> >
> > Index: src/bin/psql/command.c
> > ===================================================================
> > RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/command.c,v
> > retrieving revision 1.84
> > diff -u -r1.84 command.c
> > --- src/bin/psql/command.c 2002/10/23 19:23:56 1.84
> > +++ src/bin/psql/command.c 2003/01/10 22:06:07
> > @@ -1639,6 +1639,9 @@
> > error = true;
> > }
> >
> > +#ifdef USE_READLINE
> > + replace_history_entry(where_history(),query_buf->data,NULL);
> > +#endif
> > fclose(stream);
> > }
> >
> > Ross
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> >
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2003-02-13 13:09:41 Re: location of the configuration files
Previous Message Vince Vielhaber 2003-02-13 12:00:11 Re: location of the configuration files