Skip to content

Commit f2e0802

Browse files
Ashwin Agrawalkhannaektabaobao0306Paul GuoRichard Guo
committed
Merge with PostgreSQL 9.4 STABLE (tag: 9.4.20)
This merges upto upstream commit 4f0bf33 (tag: REL9_4_20). Co-authored-by: Ashwin Agrawal <[email protected]> Co-authored-by: Ekta Khanna <[email protected]> Co-authored-by: Jinbao Chen <[email protected]> Co-authored-by: Paul Guo <[email protected]> Co-authored-by: Richard Guo <[email protected]> Co-authored-by: Shaoqi Bai <[email protected]>
2 parents 5cec42e + 4f0bf33 commit f2e0802

File tree

1,539 files changed

+506512
-118827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,539 files changed

+506512
-118827
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ src/backend/regex/re_syntax.n -whitespace
3333
src/backend/snowball/libstemmer/*.c -whitespace
3434
src/backend/utils/mb/Unicode/*-std.txt -whitespace
3535
src/include/snowball/libstemmer/* -whitespace
36+
src/timezone/data/* -whitespace

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ lib*.pc
5555

5656
# Local excludes in root directory
5757
/GNUmakefile
58+
/config.cache
5859
/config.log
5960
/config.status
6061
/VERSION

COPYRIGHT

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ the PostgreSQL License is provided below:
1414
PostgreSQL Database Management System
1515
(formerly known as Postgres, then as Postgres95)
1616

17-
Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
17+
Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
1818

1919
Portions Copyright (c) 1994, The Regents of the University of California
2020

HISTORY

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Release notes for all versions of PostgreSQL can be found on-line at
2-
http://www.postgresql.org/docs/current/static/release.html
2+
https://www.postgresql.org/docs/current/static/release.html
33

44
Distribution file sets include release notes for their version and preceding
55
versions. Visit the file doc/src/sgml/html/release.html in an HTML browser.

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
# GNUmakefile won't exist yet, so we catch that case as well.
1212

1313

14+
# AIX make defaults to building *every* target of the first rule. Start with
15+
# a single-target, empty rule to make the other targets non-default.
16+
all:
17+
1418
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world installcheck-resgroup:
1519
@if [ ! -f GNUmakefile ] ; then \
1620
echo "You need to run the 'configure' program first. See the file"; \

README.PostgreSQL

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and functions. This distribution also contains C language bindings.
1111

1212
PostgreSQL has many language interfaces, many of which are listed here:
1313

14-
http://www.postgresql.org/download
14+
https://www.postgresql.org/download
1515

1616
See the file INSTALL for instructions on how to build and install
1717
PostgreSQL. That file also lists supported operating systems and
@@ -23,5 +23,5 @@ distribution; it can be read as described in the installation
2323
instructions.
2424

2525
The latest version of this software may be obtained at
26-
http://www.postgresql.org/download/. For more information look at our
27-
web site located at http://www.postgresql.org/.
26+
https://www.postgresql.org/download/. For more information look at our
27+
web site located at https://www.postgresql.org/.

README.git

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ git and so will not be present if you are using a git checkout.
66

77
If you are using a git checkout, you can view the most recent installation
88
instructions at:
9-
http://www.postgresql.org/docs/devel/static/installation.html
9+
https://www.postgresql.org/docs/devel/static/installation.html
1010

1111
Users compiling from git will also need compatible versions of Bison, Flex,
1212
and Perl, as discussed in the install documentation. These programs are not

concourse/scripts/test_upgrade.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ compare_dumps() {
317317
scp "$DIRNAME/dumpsort.gawk" ${MASTER_HOST}:~
318318

319319
ssh -n ${MASTER_HOST} "
320-
diff -U3 --speed-large-files --ignore-space-change \
320+
diff -w -U3 --speed-large-files --ignore-space-change \
321321
<(gawk -f ~/dumpsort.gawk < '$old_dump') \
322322
<(gawk -f ~/dumpsort.gawk < '$new_dump')
323323
"

config/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ include $(top_builddir)/src/Makefile.global
77

88
install: all installdirs
99
$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
10+
$(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing'
1011

1112
installdirs:
1213
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config'
1314

1415
uninstall:
1516
rm -f '$(DESTDIR)$(pgxsdir)/config/install-sh'
17+
rm -f '$(DESTDIR)$(pgxsdir)/config/missing'

config/c-library.m4

+40-10
Original file line numberDiff line numberDiff line change
@@ -105,23 +105,23 @@ fi
105105

106106
# PGAC_FUNC_STRERROR_R_INT
107107
# ---------------------------
108-
# Check if strerror_r() returns an int (SUSv3) rather than a char * (GNU libc)
109-
# If so, define STRERROR_R_INT
108+
# Check if strerror_r() returns int (POSIX) rather than char * (GNU libc).
109+
# If so, define STRERROR_R_INT.
110+
# The result is uncertain if strerror_r() isn't provided,
111+
# but we don't much care.
110112
AC_DEFUN([PGAC_FUNC_STRERROR_R_INT],
111113
[AC_CACHE_CHECK(whether strerror_r returns int,
112114
pgac_cv_func_strerror_r_int,
113115
[AC_TRY_COMPILE([#include <string.h>],
114-
[#ifndef _AIX
115-
int strerror_r(int, char *, size_t);
116-
#else
117-
/* Older AIX has 'int' for the third argument so we don't test the args. */
118-
int strerror_r();
119-
#endif],
116+
[char buf[100];
117+
switch (strerror_r(1, buf, sizeof(buf)))
118+
{ case 0: break; default: break; }
119+
],
120120
[pgac_cv_func_strerror_r_int=yes],
121121
[pgac_cv_func_strerror_r_int=no])])
122122
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
123123
AC_DEFINE(STRERROR_R_INT, 1,
124-
[Define to 1 if strerror_r() returns a int.])
124+
[Define to 1 if strerror_r() returns int.])
125125
fi
126126
])# PGAC_FUNC_STRERROR_R_INT
127127

@@ -366,4 +366,34 @@ fi
366366
if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
367367
AC_DEFINE(LOCALE_T_IN_XLOCALE, 1,
368368
[Define to 1 if `locale_t' requires <xlocale.h>.])
369-
fi])])# PGAC_HEADER_XLOCALE
369+
fi])# PGAC_TYPE_LOCALE_T
370+
371+
372+
# PGAC_FUNC_WCSTOMBS_L
373+
# --------------------
374+
# Try to find a declaration for wcstombs_l(). It might be in stdlib.h
375+
# (following the POSIX requirement for wcstombs()), or in locale.h, or in
376+
# xlocale.h. If it's in the latter, define WCSTOMBS_L_IN_XLOCALE.
377+
#
378+
AC_DEFUN([PGAC_FUNC_WCSTOMBS_L],
379+
[AC_CACHE_CHECK([for wcstombs_l declaration], pgac_cv_func_wcstombs_l,
380+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
381+
[#include <stdlib.h>
382+
#include <locale.h>],
383+
[#ifndef wcstombs_l
384+
(void) wcstombs_l;
385+
#endif])],
386+
[pgac_cv_func_wcstombs_l='yes'],
387+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
388+
[#include <stdlib.h>
389+
#include <locale.h>
390+
#include <xlocale.h>],
391+
[#ifndef wcstombs_l
392+
(void) wcstombs_l;
393+
#endif])],
394+
[pgac_cv_func_wcstombs_l='yes (in xlocale.h)'],
395+
[pgac_cv_func_wcstombs_l='no'])])])
396+
if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
397+
AC_DEFINE(WCSTOMBS_L_IN_XLOCALE, 1,
398+
[Define to 1 if `wcstombs_l' requires <xlocale.h>.])
399+
fi])# PGAC_FUNC_WCSTOMBS_L

config/perl.m4

+43-5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,37 @@ AC_DEFUN([PGAC_CHECK_PERL_CONFIGS],
4949
[m4_foreach([pgac_item], [$1], [PGAC_CHECK_PERL_CONFIG(pgac_item)])])
5050

5151

52+
# PGAC_CHECK_PERL_EMBED_CCFLAGS
53+
# -----------------------------
54+
# We selectively extract stuff from $Config{ccflags}. For debugging purposes,
55+
# let's have the configure output report the raw ccflags value as well as the
56+
# set of flags we chose to adopt. We don't really need anything except -D
57+
# switches, and other sorts of compiler switches can actively break things if
58+
# Perl was compiled with a different compiler. Moreover, although Perl likes
59+
# to put stuff like -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64 here, it
60+
# would be fatal to try to compile PL/Perl to a different libc ABI than core
61+
# Postgres uses. The available information says that most symbols that affect
62+
# Perl's own ABI begin with letters, so it's almost sufficient to adopt -D
63+
# switches for symbols not beginning with underscore. Some exceptions are the
64+
# Windows-specific -D_USE_32BIT_TIME_T and -D__MINGW_USE_VC2005_COMPAT; see
65+
# Mkvcbuild.pm for details. We absorb the former when Perl reports it. Perl
66+
# never reports the latter, and we don't attempt to deduce when it's needed.
67+
# Consequently, we don't support using MinGW to link to MSVC-built Perl. As
68+
# of 2017, all supported ActivePerl and Strawberry Perl are MinGW-built. If
69+
# that changes or an MSVC-built Perl distribution becomes prominent, we can
70+
# revisit this limitation.
71+
AC_DEFUN([PGAC_CHECK_PERL_EMBED_CCFLAGS],
72+
[AC_REQUIRE([PGAC_PATH_PERL])
73+
AC_MSG_CHECKING([for CFLAGS recommended by Perl])
74+
perl_ccflags=`$PERL -MConfig -e ['print $Config{ccflags}']`
75+
AC_MSG_RESULT([$perl_ccflags])
76+
AC_MSG_CHECKING([for CFLAGS to compile embedded Perl])
77+
perl_embed_ccflags=`$PERL -MConfig -e ['foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}']`
78+
AC_SUBST(perl_embed_ccflags)dnl
79+
AC_MSG_RESULT([$perl_embed_ccflags])
80+
])# PGAC_CHECK_PERL_EMBED_CCFLAGS
81+
82+
5283
# PGAC_CHECK_PERL_EMBED_LDFLAGS
5384
# -----------------------------
5485
# We are after Embed's ldopts, but without the subset mentioned in
@@ -59,12 +90,19 @@ AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS],
5990
[AC_REQUIRE([PGAC_PATH_PERL])
6091
AC_MSG_CHECKING(for flags to link embedded Perl)
6192
if test "$PORTNAME" = "win32" ; then
62-
perl_lib=`basename $perl_archlibexp/CORE/perl[[5-9]]*.lib .lib`
63-
test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
93+
perl_lib=`basename $perl_archlibexp/CORE/perl[[5-9]]*.lib .lib`
94+
if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
95+
perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
96+
else
97+
perl_lib=`basename $perl_archlibexp/CORE/libperl[[5-9]]*.a .a | sed 's/^lib//'`
98+
if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
99+
perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
100+
fi
101+
fi
64102
else
65-
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
66-
pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
67-
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]`
103+
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
104+
pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
105+
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]`
68106
fi
69107
AC_SUBST(perl_embed_ldflags)dnl
70108
if test -z "$perl_embed_ldflags" ; then

config/tcl.m4

+12-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ fi
1313

1414
# PGAC_PATH_TCLCONFIGSH([SEARCH-PATH])
1515
# ------------------------------------
16+
# If the user doesn't specify $TCL_CONFIG_SH directly, search for it in
17+
# the list of directories passed as parameter (from --with-tclconfig).
18+
# If no list is given, try the Tcl shell's $auto_path.
19+
1620
AC_DEFUN([PGAC_PATH_TCLCONFIGSH],
1721
[AC_REQUIRE([PGAC_PATH_TCLSH])[]dnl
1822
AC_BEFORE([$0], [PGAC_PATH_TKCONFIGSH])[]dnl
@@ -24,7 +28,14 @@ if test -z "$TCL_CONFIG_SH"; then
2428
set X $pgac_test_dirs; shift
2529
if test $[#] -eq 0; then
2630
test -z "$TCLSH" && AC_MSG_ERROR([unable to locate tclConfig.sh because no Tcl shell was found])
27-
set X `echo 'puts $auto_path' | $TCLSH`; shift
31+
pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
32+
# On newer macOS, $auto_path frequently doesn't include the place
33+
# where tclConfig.sh actually lives. Append that to the end, so as not
34+
# to break cases where a non-default Tcl installation is being used.
35+
if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
36+
pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
37+
fi
38+
set X $pgac_test_dirs; shift
2839
fi
2940
3041
for pgac_dir do

0 commit comments

Comments
 (0)