postgres/src
Tom Lane 2cb76fa6ff Remove workaround for ancient incompatibility between readline and libedit.
GNU readline defines the return value of write_history() as "zero if OK,
else an errno code".  libedit's version of that function used to have a
different definition (to wit, "-1 if error, else the number of lines
written to the file").  We tried to work around that by checking whether
errno had become nonzero, but this method has never been kosher according
to the published API of either library.  It's reportedly completely broken
in recent Ubuntu releases: psql bleats about "No such file or directory"
when saving ~/.psql_history, even though the write worked fine.

However, libedit has been following the readline definition since somewhere
around 2006, so it seems all right to finally break compatibility with
ancient libedit releases and trust that the return value is what readline
specifies.  (I'm not sure when the various Linux distributions incorporated
this fix, but I did find that OS X has been shipping fixed versions since
10.5/Leopard.)

If anyone is still using such an ancient libedit, they will find that psql
complains it can't write ~/.psql_history at exit, even when the file was
written correctly.  This is no worse than the behavior we're fixing for
current releases.

Back-patch to all supported branches.
2015-03-14 13:43:13 -04:00
..
backend Fix integer overflow in debug message of walreceiver 2015-03-14 08:21:56 +09:00
bin Remove workaround for ancient incompatibility between readline and libedit. 2015-03-14 13:43:13 -04:00
common Unlink static libraries before rebuilding them. 2015-03-01 13:06:39 -05:00
include Remove code to match IPv4 pg_hba.conf entries to IPv4-in-IPv6 addresses. 2015-02-17 12:49:18 -05:00
interfaces Cast to (void *) rather than (int *) when passing int64's to PQfn(). 2015-03-08 13:58:39 -04:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:13:32 -05:00
pl Free SQLSTATE and SQLERRM no earlier than other PL/pgSQL variables. 2015-02-25 23:48:54 -05:00
port Unlink static libraries before rebuilding them. 2015-03-01 13:06:39 -05:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Fix user mapping object description 2015-03-05 18:03:16 -03:00
timezone Update time zone data files to tzdata release 2015a. 2015-01-30 22:46:05 -05:00
tools Add pg_string_endswith as the start of a string helper library in src/common. 2015-01-03 20:54:13 +01:00
tutorial Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
.gitignore
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Revert "Backpatch pgxs vpath build and installation fixes." 2013-10-07 22:32:04 -04:00
Makefile.shlib Unlink static libraries before rebuilding them. 2015-03-01 13:06:39 -05:00
nls-global.mk NLS: Use msgmerge --previous option 2012-12-13 23:12:12 -05:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00