Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 34bb18e

Browse files
committed
Merge branch 'PGPROEE10' into PGPROEE10-pgpro-791
2 parents efbed09 + 53e3312 commit 34bb18e

File tree

400 files changed

+95945
-29135
lines changed

Some content is hidden

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

400 files changed

+95945
-29135
lines changed

configure

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for PostgreSQL 10.3.
3+
# Generated by GNU Autoconf 2.69 for PostgreSQL 10.4.
44
#
55
# Report bugs to <bugs@postgrespro.ru>.
66
#
@@ -583,8 +583,8 @@ MAKEFLAGS=
583583
# Identity of this package.
584584
PACKAGE_NAME='PostgreSQL'
585585
PACKAGE_TARNAME='postgrespro'
586-
PACKAGE_VERSION='10.3'
587-
PACKAGE_STRING='PostgreSQL 10.3'
586+
PACKAGE_VERSION='10.4'
587+
PACKAGE_STRING='PostgreSQL 10.4'
588588
PACKAGE_BUGREPORT='bugs@postgrespro.ru'
589589
PACKAGE_URL=''
590590

@@ -1431,7 +1431,7 @@ if test "$ac_init_help" = "long"; then
14311431
# Omit some internal or obsolete options to make the list less imposing.
14321432
# This message is too long to be a string in the A/UX 3.1 sh.
14331433
cat <<_ACEOF
1434-
\`configure' configures PostgreSQL 10.3 to adapt to many kinds of systems.
1434+
\`configure' configures PostgreSQL 10.4 to adapt to many kinds of systems.
14351435
14361436
Usage: $0 [OPTION]... [VAR=VALUE]...
14371437
@@ -1497,7 +1497,7 @@ fi
14971497

14981498
if test -n "$ac_init_help"; then
14991499
case $ac_init_help in
1500-
short | recursive ) echo "Configuration of PostgreSQL 10.3:";;
1500+
short | recursive ) echo "Configuration of PostgreSQL 10.4:";;
15011501
esac
15021502
cat <<\_ACEOF
15031503
@@ -1658,7 +1658,7 @@ fi
16581658
test -n "$ac_init_help" && exit $ac_status
16591659
if $ac_init_version; then
16601660
cat <<\_ACEOF
1661-
PostgreSQL configure 10.3
1661+
PostgreSQL configure 10.4
16621662
generated by GNU Autoconf 2.69
16631663
16641664
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2370,7 +2370,7 @@ cat >config.log <<_ACEOF
23702370
This file contains any messages produced by compilers while
23712371
running configure, to aid debugging if configure makes a mistake.
23722372
2373-
It was created by PostgreSQL $as_me 10.3, which was
2373+
It was created by PostgreSQL $as_me 10.4, which was
23742374
generated by GNU Autoconf 2.69. Invocation command line was
23752375
23762376
$ $0 $@
@@ -2788,7 +2788,7 @@ fi
27882788

27892789

27902790

2791-
PGPRO_VERSION="$PACKAGE_VERSION.3"
2791+
PGPRO_VERSION="$PACKAGE_VERSION.1"
27922792
PGPRO_PACKAGE_NAME="PostgresPro"
27932793
PGPRO_EDITION="enterprise"
27942794
PGPRO_EDN="ent"
@@ -17727,7 +17727,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1772717727
# report actual input values of CONFIG_FILES etc. instead of their
1772817728
# values after options handling.
1772917729
ac_log="
17730-
This file was extended by PostgreSQL $as_me 10.3, which was
17730+
This file was extended by PostgreSQL $as_me 10.4, which was
1773117731
generated by GNU Autoconf 2.69. Invocation command line was
1773217732
1773317733
CONFIG_FILES = $CONFIG_FILES
@@ -17797,7 +17797,7 @@ _ACEOF
1779717797
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1779817798
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1779917799
ac_cs_version="\\
17800-
PostgreSQL config.status 10.3
17800+
PostgreSQL config.status 10.4
1780117801
configured by $0, generated by GNU Autoconf 2.69,
1780217802
with options \\"\$ac_cs_config\\"
1780317803

configure.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details.
1717
dnl
1818
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
1919

20-
AC_INIT([PostgreSQL], [10.3], [bugs@postgrespro.ru], [postgrespro])
20+
AC_INIT([PostgreSQL], [10.4], [bugs@postgrespro.ru], [postgrespro])
2121
PACKAGE_TARNAME=postgrespro-enterprise
2222

2323
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
@@ -39,7 +39,7 @@ PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
3939
[PG_VERSION="$PACKAGE_VERSION$withval"],
4040
[PG_VERSION="$PACKAGE_VERSION"])
4141

42-
PGPRO_VERSION="$PACKAGE_VERSION.3"
42+
PGPRO_VERSION="$PACKAGE_VERSION.1"
4343
PGPRO_PACKAGE_NAME="PostgresPro"
4444
PGPRO_EDITION="enterprise"
4545
PGPRO_EDN="ent"
@@ -1984,11 +1984,11 @@ if test x"$USE_SSE42_CRC32C" = x"1"; then
19841984
AC_MSG_RESULT(SSE 4.2)
19851985
else
19861986
if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
1987-
AC_DEFINE(USE_SSE42_CRC32C_WITH_RUNTIME_CHECK, 1, [Define to 1 to use Intel SSSE 4.2 CRC instructions with a runtime check.])
1987+
AC_DEFINE(USE_SSE42_CRC32C_WITH_RUNTIME_CHECK, 1, [Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check.])
19881988
PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
19891989
AC_MSG_RESULT(SSE 4.2 with runtime check)
19901990
else
1991-
AC_DEFINE(USE_SLICING_BY_8_CRC32C, 1, [Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check.])
1991+
AC_DEFINE(USE_SLICING_BY_8_CRC32C, 1, [Define to 1 to use software CRC-32C implementation (slicing-by-8).])
19921992
PG_CRC32C_OBJS="pg_crc32c_sb8.o"
19931993
AC_MSG_RESULT(slicing-by-8)
19941994
fi

contrib/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SUBDIRS = \
2828
hstore \
2929
hunspell_en_us \
3030
hunspell_fr \
31+
hunspell_ne_np \
3132
hunspell_nl_nl \
3233
hunspell_ru_ru \
3334
in_memory \
@@ -68,6 +69,7 @@ SUBDIRS = \
6869
referee \
6970
seg \
7071
shared_ispell \
72+
snowball_ext \
7173
spi \
7274
sr_plan \
7375
tablefunc \

contrib/adminpack/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ OBJS = adminpack.o $(WIN32RES)
55
PG_CPPFLAGS = -I$(libpq_srcdir)
66

77
EXTENSION = adminpack
8-
DATA = adminpack--1.0.sql
8+
DATA = adminpack--1.0.sql adminpack--1.0--1.1.sql
99
PGFILEDESC = "adminpack - support functions for pgAdmin"
1010

1111
ifdef USE_PGXS
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* contrib/adminpack/adminpack--1.0--1.1.sql */
2+
3+
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
4+
\echo Use "ALTER EXTENSION adminpack UPDATE TO '1.1'" to load this file. \quit
5+
6+
REVOKE EXECUTE ON FUNCTION pg_catalog.pg_logfile_rotate() FROM PUBLIC;

contrib/adminpack/adminpack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pg_file_rename(PG_FUNCTION_ARGS)
173173
fn1 = convert_and_check_filename(PG_GETARG_TEXT_PP(0), false);
174174
fn2 = convert_and_check_filename(PG_GETARG_TEXT_PP(1), false);
175175
if (PG_ARGISNULL(2))
176-
fn3 = 0;
176+
fn3 = NULL;
177177
else
178178
fn3 = convert_and_check_filename(PG_GETARG_TEXT_PP(2), false);
179179

@@ -195,7 +195,7 @@ pg_file_rename(PG_FUNCTION_ARGS)
195195
PG_RETURN_BOOL(false);
196196
}
197197

198-
rc = access(fn3 ? fn3 : fn2, 2);
198+
rc = access(fn3 ? fn3 : fn2, W_OK);
199199
if (rc >= 0 || errno != ENOENT)
200200
{
201201
ereport(ERROR,

contrib/adminpack/adminpack.control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# adminpack extension
22
comment = 'administrative functions for PostgreSQL'
3-
default_version = '1.0'
3+
default_version = '1.1'
44
module_pathname = '$libdir/adminpack'
55
relocatable = false
66
schema = pg_catalog

contrib/bloom/blinsert.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ PG_MODULE_MAGIC;
3333
typedef struct
3434
{
3535
BloomState blstate; /* bloom index state */
36+
int64 indtuples; /* total number of tuples indexed */
3637
MemoryContext tmpCtx; /* temporary memory context reset after each
3738
* tuple */
3839
char data[BLCKSZ]; /* cached page */
39-
int64 count; /* number of tuples in cached page */
40+
int count; /* number of tuples in cached page */
4041
} BloomBuildState;
4142

4243
/*
@@ -102,8 +103,14 @@ bloomBuildCallback(Relation index, HeapTuple htup, Datum *values,
102103
/* We shouldn't be here since we're inserting to the empty page */
103104
elog(ERROR, "could not add new bloom tuple to empty page");
104105
}
106+
107+
/* Next item was added successfully */
108+
buildstate->count++;
105109
}
106110

111+
/* Update total tuple count */
112+
buildstate->indtuples += 1;
113+
107114
MemoryContextSwitchTo(oldCtx);
108115
MemoryContextReset(buildstate->tmpCtx);
109116
}
@@ -137,17 +144,15 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
137144
reltuples = IndexBuildHeapScan(heap, index, indexInfo, true,
138145
bloomBuildCallback, (void *) &buildstate);
139146

140-
/*
141-
* There are could be some items in cached page. Flush this page if
142-
* needed.
143-
*/
147+
/* Flush last page if needed (it will be, unless heap was empty) */
144148
if (buildstate.count > 0)
145149
flushCachedPage(index, &buildstate);
146150

147151
MemoryContextDelete(buildstate.tmpCtx);
148152

149153
result = (IndexBuildResult *) palloc(sizeof(IndexBuildResult));
150-
result->heap_tuples = result->index_tuples = reltuples;
154+
result->heap_tuples = reltuples;
155+
result->index_tuples = buildstate.indtuples;
151156

152157
return result;
153158
}

contrib/btree_gist/btree_inet.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ gbt_inet_compress(PG_FUNCTION_ARGS)
9999
if (entry->leafkey)
100100
{
101101
inetKEY *r = (inetKEY *) palloc(sizeof(inetKEY));
102+
bool failure = false;
102103

103104
retval = palloc(sizeof(GISTENTRY));
104-
r->lower = convert_network_to_scalar(entry->key, INETOID);
105+
r->lower = convert_network_to_scalar(entry->key, INETOID, &failure);
106+
Assert(!failure);
105107
r->upper = r->lower;
106108
gistentryinit(*retval, PointerGetDatum(r),
107109
entry->rel, entry->page,
@@ -118,13 +120,18 @@ Datum
118120
gbt_inet_consistent(PG_FUNCTION_ARGS)
119121
{
120122
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
121-
double query = convert_network_to_scalar(PG_GETARG_DATUM(1), INETOID);
123+
Datum dquery = PG_GETARG_DATUM(1);
122124
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
123125

124126
/* Oid subtype = PG_GETARG_OID(3); */
125127
bool *recheck = (bool *) PG_GETARG_POINTER(4);
126128
inetKEY *kkk = (inetKEY *) DatumGetPointer(entry->key);
127129
GBT_NUMKEY_R key;
130+
double query;
131+
bool failure = false;
132+
133+
query = convert_network_to_scalar(dquery, INETOID, &failure);
134+
Assert(!failure);
128135

129136
/* All cases served by this function are inexact */
130137
*recheck = true;

contrib/btree_gist/expected/inet.out

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,42 @@ SELECT count(*) FROM inettmp WHERE a > '89.225.196.191'::inet;
6464
386
6565
(1 row)
6666

67+
VACUUM inettmp;
68+
-- gist_inet_ops lacks a fetch function, so this should not be index-only scan
69+
EXPLAIN (COSTS OFF)
70+
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
71+
QUERY PLAN
72+
--------------------------------------------------------
73+
Aggregate
74+
-> Bitmap Heap Scan on inettmp
75+
Recheck Cond: (a = '89.225.196.191'::inet)
76+
-> Bitmap Index Scan on inetidx
77+
Index Cond: (a = '89.225.196.191'::inet)
78+
(5 rows)
79+
80+
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
81+
count
82+
-------
83+
1
84+
(1 row)
85+
86+
DROP INDEX inetidx;
87+
CREATE INDEX ON inettmp USING gist (a gist_inet_ops, a inet_ops);
88+
-- likewise here (checks for core planner bug)
89+
EXPLAIN (COSTS OFF)
90+
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
91+
QUERY PLAN
92+
--------------------------------------------------------
93+
Aggregate
94+
-> Bitmap Heap Scan on inettmp
95+
Recheck Cond: (a = '89.225.196.191'::inet)
96+
-> Bitmap Index Scan on inettmp_a_a1_idx
97+
Index Cond: (a = '89.225.196.191'::inet)
98+
(5 rows)
99+
100+
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
101+
count
102+
-------
103+
1
104+
(1 row)
105+

contrib/btree_gist/sql/inet.sql

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,21 @@ SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
2929
SELECT count(*) FROM inettmp WHERE a >= '89.225.196.191'::inet;
3030

3131
SELECT count(*) FROM inettmp WHERE a > '89.225.196.191'::inet;
32+
33+
VACUUM inettmp;
34+
35+
-- gist_inet_ops lacks a fetch function, so this should not be index-only scan
36+
EXPLAIN (COSTS OFF)
37+
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
38+
39+
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
40+
41+
DROP INDEX inetidx;
42+
43+
CREATE INDEX ON inettmp USING gist (a gist_inet_ops, a inet_ops);
44+
45+
-- likewise here (checks for core planner bug)
46+
EXPLAIN (COSTS OFF)
47+
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
48+
49+
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;

contrib/cube/cube.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,6 @@ cube_coord_llur(PG_FUNCTION_ARGS)
15551555
{
15561556
NDBOX *cube = PG_GETARG_NDBOX(0);
15571557
int coord = PG_GETARG_INT32(1);
1558-
bool inverse = false;
15591558
float8 result;
15601559

15611560
/* 0 is the only unsupported coordinate value */
@@ -1593,10 +1592,6 @@ cube_coord_llur(PG_FUNCTION_ARGS)
15931592
result = 0.0;
15941593
}
15951594

1596-
/* Inverse value if needed */
1597-
if (inverse)
1598-
result = -result;
1599-
16001595
PG_RETURN_FLOAT8(result);
16011596
}
16021597

contrib/fasttrun/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MODULE_big = fasttrun
22
OBJS = fasttrun.o $(WIN32RES)
33
EXTENSION = fasttrun
4-
DATA = fasttrun--1.0.sql
4+
DATA = fasttrun--2.0.sql fasttrun--unpackaged--2.0.sql
55
DOCS = README.fasttrun
66
REGRESS = fasttrun
77
PGFIELDDESC = "fasttrun - functions to truncates the temporary table and doesn't grow pg_class size."
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
\echo Use "CREATE EXTENSION fasttrun FROM unpackaged" to load this file. \quit
2+
3+
ALTER EXTENSION fasttrun ADD function fasttruncate(text);
4+

contrib/fasttrun/fasttrun.control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fasttrun extension
22
comment = 'Functions to truncates the temporary table and does not grow pg_class size'
3-
default_version = '1.0'
3+
default_version = '2.0'
44
module_pathname = '$libdir/fasttrun'
5-
relocatable = true
5+
relocatable = true

0 commit comments

Comments
 (0)