On Sat, Feb 15, 2003 at 03:10:19PM -0600, Ross J. Reedstrom wrote: > On Fri, Feb 14, 2003 at 11:32:02AM -0500, Tom Lane wrote: > > Patrick Welche <[EMAIL PROTECTED]> writes: > > > On Thu, Feb 13, 2003 at 10:25:52AM -0500, Tom Lane wrote: > > >> Well, is that a bug in your wrapper? Or must we add a configure test > > >> for the presence of replace_history_entry()? > > > > > Good question. Easiest for now for me would be add a configure test. > > > > Okay with me --- Ross, can you handle that?
O.K., I found the 'editline' wrapper around 'libedit' that provides a subset of readline functionality, and used that for testing. On my Debian Linux systems, editline installs readline compatability headers (readline.h, history.h) into /usr/include/editline/, so I added tests for those into configure.in, and src/include/pg_config.h.in, and usage in src/bin/psql/input.h I added a test for replace_history_entry() to configure.in, and usage of it to src/bin/psql/command.c. As you may recall, the original purpose of this patch was to deal with the interaction of '\e' with the history buffer. I implemented replacing the '\e' entry in the buffer with the query as returned by the edit session and sent to the backend. If the replace_history_entry function is missing, I now just push the edited entry onto the history stack, leaving the '\e' in place as well. Tested on systems with readline, editline, and --without-readline. Since the patch has now grown to 25 lines, I've posted it over to PATCHES. Ross ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html