Tom Lane wrote:
> Jason Schroeder <shrode@astanetworks.com> writes:
> > The following configure.in patch changes the following:
> > 1) It adds --without-readline to control whether the readling package is
> > used
>
> Just out of curiosity, why would you want such a thing?
>
I can suggest one reason:
psql starts up with readline support turned on by default. If readline/curses
is broken, this may show up at runtime as a pq_recvbuf error and a core dump.
psql isn't obvious about the relationship to readline, creating a mystery for
first-timers.
Since it is readline, and it is on by default, just maybe that first-timer
might reconfigure turning "luxuries" off and psql will work. The alternative
is them finding that obscure scrap of advice (not in doc/*) associating
recvbuf errors with readline support.
I had this problem on a very typically setup Solaris but did not look for a
way to build w/o readline. I really wanted it so I kept at it, but one *can*
live without command-history, being content to have psql fire up without
errors (surviving nicely with \e). IIRC, my problem was ncurses existing and
being compiled with or without termcap. Can't remember the details, but it
wasn't psql, or even readline all by itself.
Suggestion: if this problem is common (anyone know?), it would be nice for
psql to trap the error and mention the "-n" option. I suspect that Solaris ppl
who install a pre-built ncurses might run into this alot.
Cheers,
--Rick