Skip to content

Commit d6a158e

Browse files
committed
fix merge error
2 parents 1c9873b + cdfb1bd commit d6a158e

File tree

331 files changed

+490934
-4921
lines changed

Some content is hidden

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

331 files changed

+490934
-4921
lines changed

configure

Lines changed: 1802 additions & 146 deletions
Large diffs are not rendered by default.

configure.in

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,16 @@ PGAC_ARG_BOOL(with, selinux, no, [build with SELinux support])
699699
AC_SUBST(with_selinux)
700700
AC_MSG_RESULT([$with_selinux])
701701

702+
#
703+
# ICU
704+
#
705+
AC_MSG_CHECKING([whether to build with ICU support])
706+
PGAC_ARG_BOOL(with, icu, no, [ --with-icu build with ICU support],
707+
[AC_DEFINE([USE_ICU], 1, [Define to build with ICU support. (--with-icu)])])
708+
AC_MSG_RESULT([$with_icu])
709+
AC_SUBST(with_icu)
710+
711+
702712
#
703713
# Readline
704714
#
@@ -1036,6 +1046,67 @@ if test "$with_openssl" = yes ; then
10361046
AC_CHECK_FUNCS([SSL_get_current_compression])
10371047
fi
10381048

1049+
if test "$with_icu" = yes ; then
1050+
AC_SEARCH_LIBS(ucol_open_57, [icui18n icuin], [], [
1051+
AC_SEARCH_LIBS(ucol_open_56, [icui18n icuin], [], [
1052+
AC_SEARCH_LIBS(ucol_open_55, [icui18n icuin], [], [
1053+
AC_SEARCH_LIBS(ucol_open_54, [icui18n icuin], [], [
1054+
AC_SEARCH_LIBS(ucol_open_53, [icui18n icuin], [], [
1055+
AC_SEARCH_LIBS(ucol_open_52, [icui18n icuin], [], [
1056+
AC_SEARCH_LIBS(ucol_open_50, [icui18n icuin], [], [
1057+
AC_SEARCH_LIBS(ucol_open_48, [icui18n icuin], [], [
1058+
AC_SEARCH_LIBS(ucol_open_46, [icui18n icuin], [], [
1059+
AC_SEARCH_LIBS(ucol_open_44, [icui18n icuin], [], [
1060+
AC_SEARCH_LIBS(ucol_open_43, [icui18n icuin], [], [
1061+
AC_SEARCH_LIBS(ucol_open_4_2, [icui18n icuin], [], [
1062+
AC_SEARCH_LIBS(ucol_open_3_8, [icui18n icuin], [], [
1063+
AC_SEARCH_LIBS(ucol_open_3_6, [icui18n icuin], [], [
1064+
AC_SEARCH_LIBS(ucol_open_3_4, [icui18n icuin], [], [AC_MSG_ERROR([library 'icui18n' is required for ICU])])
1065+
])
1066+
])
1067+
])
1068+
])
1069+
])
1070+
])
1071+
])
1072+
])
1073+
])
1074+
])
1075+
])
1076+
])
1077+
])
1078+
])
1079+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_57, [], [
1080+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_56, [], [
1081+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_55, [], [
1082+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_54, [], [
1083+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_53, [], [
1084+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_52, [], [
1085+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_50, [], [
1086+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_48, [], [
1087+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_46, [], [
1088+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_44, [], [
1089+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_43, [], [
1090+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_4_2, [], [
1091+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_3_8, [], [
1092+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_3_6, [], [
1093+
AC_CHECK_LIB(icuuc, ucnv_fromUChars_3_4, [], [AC_MSG_ERROR([library 'icuuc' is required for ICU])])
1094+
])
1095+
])
1096+
])
1097+
])
1098+
])
1099+
])
1100+
])
1101+
])
1102+
])
1103+
])
1104+
])
1105+
])
1106+
])
1107+
])
1108+
fi
1109+
10391110
if test "$with_pam" = yes ; then
10401111
AC_CHECK_LIB(pam, pam_start, [], [AC_MSG_ERROR([library 'pam' is required for PAM])])
10411112
fi
@@ -1162,6 +1233,10 @@ if test "$with_openssl" = yes ; then
11621233
AC_CHECK_HEADER(openssl/err.h, [], [AC_MSG_ERROR([header file <openssl/err.h> is required for OpenSSL])])
11631234
fi
11641235

1236+
if test "$with_icu" = yes ; then
1237+
AC_CHECK_HEADER(unicode/utypes.h, [], [AC_MSG_ERROR([header file <unicode/utypes.h> is required for ICU])])
1238+
fi
1239+
11651240
if test "$with_pam" = yes ; then
11661241
AC_CHECK_HEADERS(security/pam_appl.h, [],
11671242
[AC_CHECK_HEADERS(pam/pam_appl.h, [],

contrib/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ SUBDIRS = \
1616
dblink \
1717
dict_int \
1818
dict_xsyn \
19+
dump_stat \
1920
earthdistance \
2021
file_fdw \
2122
fuzzystrmatch \
2223
hstore \
24+
hunspell_en_us \
25+
hunspell_fr \
26+
hunspell_nl_nl \
27+
hunspell_ru_ru \
2328
intagg \
2429
intarray \
2530
isn \
@@ -40,6 +45,7 @@ SUBDIRS = \
4045
postgres_fdw \
4146
seg \
4247
spi \
48+
sr_plan \
4349
tablefunc \
4450
tcn \
4551
test_decoding \

contrib/dblink/dblink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,7 @@ get_pkey_attnames(Relation rel, int16 *numatts)
20582058
/* we're only interested if it is the primary key */
20592059
if (index->indisprimary)
20602060
{
2061-
*numatts = index->indnatts;
2061+
*numatts = index->indnkeyatts;
20622062
if (*numatts > 0)
20632063
{
20642064
result = (char **) palloc(*numatts * sizeof(char *));

contrib/dump_stat/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# contrib/pageinspect/Makefile
2+
3+
MODULE_big = dump_stat
4+
OBJS = anyarray_elemtype.o $(WIN32RES)
5+
6+
EXTENSION = dump_stat
7+
DATA = dump_stat--1.0.sql
8+
PGFILEDESC = "dump_stat - move pg_statistic to new instance of PostgreSQL"
9+
10+
ifdef USE_PGXS
11+
PG_CONFIG = pg_config
12+
PGXS := $(shell $(PG_CONFIG) --pgxs)
13+
include $(PGXS)
14+
else
15+
subdir = contrib/dump_stat
16+
top_builddir = ../..
17+
include $(top_builddir)/src/Makefile.global
18+
include $(top_srcdir)/contrib/contrib-global.mk
19+
endif

contrib/dump_stat/anyarray_elemtype.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "postgres.h"
2+
#include "utils/array.h"
3+
4+
5+
PG_MODULE_MAGIC;
6+
7+
PG_FUNCTION_INFO_V1(anyarray_elemtype);
8+
9+
10+
Datum
11+
anyarray_elemtype(PG_FUNCTION_ARGS)
12+
{
13+
#if (PG_VERSION_NUM >= 90500)
14+
AnyArrayType *v = PG_GETARG_ANY_ARRAY(0);
15+
PG_RETURN_OID(AARR_ELEMTYPE(v));
16+
#else
17+
ArrayType *v = PG_GETARG_ARRAYTYPE_P(0);
18+
PG_RETURN_OID(ARR_ELEMTYPE(v));
19+
#endif
20+
}

0 commit comments

Comments
 (0)