Skip to content

Commit 12554f7

Browse files
committed
Merge branch 'PGPRO9_5' into PGPRO9_5_ptrack_arman
2 parents 86dfa55 + d6baf4c commit 12554f7

File tree

88 files changed

+3308
-1612
lines changed

Some content is hidden

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

88 files changed

+3308
-1612
lines changed

contrib/btree_gist/expected/interval.out

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,21 @@ SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21
8989
@ 220 days 19 hours 5 mins 42 secs | @ 21 days -2 hours -15 mins -41 secs
9090
(3 rows)
9191

92+
SET enable_indexonlyscan=off;
93+
EXPLAIN (COSTS OFF)
94+
SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3;
95+
QUERY PLAN
96+
---------------------------------------------------------------------------
97+
Limit
98+
-> Index Scan using intervalidx on intervaltmp
99+
Order By: (a <-> '@ 199 days 21 hours 21 mins 23 secs'::interval)
100+
(3 rows)
101+
102+
SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3;
103+
a | ?column?
104+
-------------------------------------+--------------------------------------
105+
@ 199 days 21 hours 21 mins 23 secs | @ 0
106+
@ 183 days 6 hours 52 mins 48 secs | @ 16 days 14 hours 28 mins 35 secs
107+
@ 220 days 19 hours 5 mins 42 secs | @ 21 days -2 hours -15 mins -41 secs
108+
(3 rows)
109+

contrib/btree_gist/sql/interval.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@ SELECT count(*) FROM intervaltmp WHERE a > '199 days 21:21:23'::interval;
3535
EXPLAIN (COSTS OFF)
3636
SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3;
3737
SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3;
38+
39+
SET enable_indexonlyscan=off;
40+
41+
EXPLAIN (COSTS OFF)
42+
SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3;
43+
SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3;

contrib/hunspell_en_us/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EXTENSION = hunspell_en_us
2-
DATA = sql/hunspell_en_us--1.0.sql
2+
DATA = hunspell_en_us--1.0.sql
33

4-
DATA_TSEARCH = dict/en_us.affix dict/en_us.dict
4+
DATA_TSEARCH = en_us.affix en_us.dict
55

66
REGRESS = hunspell_en_us
77

contrib/hunspell_en_us/expected/hunspell_en_us.out

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CREATE EXTENSION hunspell_en_us;
22
CREATE TABLE table1(name varchar);
33
INSERT INTO table1 VALUES ('leaves'), ('leaved'), ('leaving'),
44
('inability'), ('abilities'), ('disability'), ('ability');
5-
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.english', t.name) AS d;
5+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('english_hunspell', t.name) AS d;
66
alias | description | token | dictionaries | dictionary | lexemes
77
-----------+-----------------+------------+---------------------------------+------------------+-----------
88
asciiword | Word, all ASCII | leaves | {english_hunspell,english_stem} | english_hunspell | {leave}
@@ -14,18 +14,18 @@ SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.english', t.name) AS d;
1414
asciiword | Word, all ASCII | ability | {english_hunspell,english_stem} | english_hunspell | {ability}
1515
(7 rows)
1616

17-
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('public.english', "name"));
18-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
19-
@@ to_tsquery('public.english', 'leaving');
17+
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('english_hunspell', "name"));
18+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
19+
@@ to_tsquery('english_hunspell', 'leaving');
2020
name
2121
---------
2222
leaves
2323
leaved
2424
leaving
2525
(3 rows)
2626

27-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
28-
@@ to_tsquery('public.english', 'abilities');
27+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
28+
@@ to_tsquery('english_hunspell', 'abilities');
2929
name
3030
------------
3131
inability
@@ -34,8 +34,8 @@ SELECT * FROM table1 WHERE to_tsvector('public.english', name)
3434
ability
3535
(4 rows)
3636

37-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
38-
@@ to_tsquery('public.english', 'ability');
37+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
38+
@@ to_tsquery('english_hunspell', 'ability');
3939
name
4040
------------
4141
inability
@@ -45,18 +45,18 @@ SELECT * FROM table1 WHERE to_tsvector('public.english', name)
4545
(4 rows)
4646

4747
DROP INDEX name_idx;
48-
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('public.english', "name"));
49-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
50-
@@ to_tsquery('public.english', 'leaving');
48+
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('english_hunspell', "name"));
49+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
50+
@@ to_tsquery('english_hunspell', 'leaving');
5151
name
5252
---------
5353
leaves
5454
leaved
5555
leaving
5656
(3 rows)
5757

58-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
59-
@@ to_tsquery('public.english', 'abilities');
58+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
59+
@@ to_tsquery('english_hunspell', 'abilities');
6060
name
6161
------------
6262
inability
@@ -65,8 +65,8 @@ SELECT * FROM table1 WHERE to_tsvector('public.english', name)
6565
ability
6666
(4 rows)
6767

68-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
69-
@@ to_tsquery('public.english', 'ability');
68+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
69+
@@ to_tsquery('english_hunspell', 'ability');
7070
name
7171
------------
7272
inability
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* contrib/hunspell_en_us/hunspell_en_us--1.0.sql */
2+
3+
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
4+
\echo Use "CREATE EXTENSION hunspell_en_us" to load this file. \quit
5+
6+
CREATE TEXT SEARCH DICTIONARY english_hunspell (
7+
TEMPLATE = ispell,
8+
DictFile = en_us,
9+
AffFile = en_us,
10+
StopWords = english
11+
);
12+
13+
COMMENT ON TEXT SEARCH DICTIONARY english_hunspell IS 'hunspell dictionary for english language';
14+
15+
CREATE TEXT SEARCH CONFIGURATION english_hunspell (
16+
COPY = simple
17+
);
18+
19+
COMMENT ON TEXT SEARCH CONFIGURATION english_hunspell IS 'hunspell configuration for english language';
20+
21+
ALTER TEXT SEARCH CONFIGURATION english_hunspell
22+
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart,
23+
word, hword, hword_part
24+
WITH english_hunspell, english_stem;

contrib/hunspell_en_us/sql/hunspell_en_us--1.0.sql

Lines changed: 0 additions & 20 deletions
This file was deleted.

contrib/hunspell_en_us/sql/hunspell_en_us.sql

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ CREATE TABLE table1(name varchar);
44
INSERT INTO table1 VALUES ('leaves'), ('leaved'), ('leaving'),
55
('inability'), ('abilities'), ('disability'), ('ability');
66

7-
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.english', t.name) AS d;
7+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('english_hunspell', t.name) AS d;
88

9-
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('public.english', "name"));
10-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
11-
@@ to_tsquery('public.english', 'leaving');
12-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
13-
@@ to_tsquery('public.english', 'abilities');
14-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
15-
@@ to_tsquery('public.english', 'ability');
9+
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('english_hunspell', "name"));
10+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
11+
@@ to_tsquery('english_hunspell', 'leaving');
12+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
13+
@@ to_tsquery('english_hunspell', 'abilities');
14+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
15+
@@ to_tsquery('english_hunspell', 'ability');
1616

1717
DROP INDEX name_idx;
18-
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('public.english', "name"));
19-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
20-
@@ to_tsquery('public.english', 'leaving');
21-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
22-
@@ to_tsquery('public.english', 'abilities');
23-
SELECT * FROM table1 WHERE to_tsvector('public.english', name)
24-
@@ to_tsquery('public.english', 'ability');
18+
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('english_hunspell', "name"));
19+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
20+
@@ to_tsquery('english_hunspell', 'leaving');
21+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
22+
@@ to_tsquery('english_hunspell', 'abilities');
23+
SELECT * FROM table1 WHERE to_tsvector('english_hunspell', name)
24+
@@ to_tsquery('english_hunspell', 'ability');

contrib/hunspell_fr/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EXTENSION = hunspell_fr
2-
DATA = sql/hunspell_fr--1.0.sql
2+
DATA = hunspell_fr--1.0.sql
33

4-
DATA_TSEARCH = dict/fr.affix dict/fr.dict
4+
DATA_TSEARCH = fr.affix fr.dict
55

66
REGRESS = hunspell_fr
77

contrib/hunspell_fr/expected/hunspell_fr.out

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CREATE EXTENSION hunspell_fr;
22
CREATE TABLE table1(name varchar);
33
INSERT INTO table1 VALUES ('batifoler'), ('batifolant'), ('batifole'), ('batifolait'),
44
('consentant'), ('consentir'), ('consentiriez');
5-
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.french', t.name) AS d;
5+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('french_hunspell', t.name) AS d;
66
alias | description | token | dictionaries | dictionary | lexemes
77
-----------+-----------------+--------------+-------------------------------+-----------------+-------------------------
88
asciiword | Word, all ASCII | batifoler | {french_hunspell,french_stem} | french_hunspell | {batifoler}
@@ -14,9 +14,9 @@ SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.french', t.name) AS d;
1414
asciiword | Word, all ASCII | consentiriez | {french_hunspell,french_stem} | french_hunspell | {consentir}
1515
(7 rows)
1616

17-
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('public.french', "name"));
18-
SELECT * FROM table1 WHERE to_tsvector('public.french', name)
19-
@@ to_tsquery('public.french', 'batifolant');
17+
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('french_hunspell', "name"));
18+
SELECT * FROM table1 WHERE to_tsvector('french_hunspell', name)
19+
@@ to_tsquery('french_hunspell', 'batifolant');
2020
name
2121
------------
2222
batifoler
@@ -25,8 +25,8 @@ SELECT * FROM table1 WHERE to_tsvector('public.french', name)
2525
batifolait
2626
(4 rows)
2727

28-
SELECT * FROM table1 WHERE to_tsvector('public.french', name)
29-
@@ to_tsquery('public.french', 'consentiriez');
28+
SELECT * FROM table1 WHERE to_tsvector('french_hunspell', name)
29+
@@ to_tsquery('french_hunspell', 'consentiriez');
3030
name
3131
--------------
3232
consentant
@@ -35,9 +35,9 @@ SELECT * FROM table1 WHERE to_tsvector('public.french', name)
3535
(3 rows)
3636

3737
DROP INDEX name_idx;
38-
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('public.french', "name"));
39-
SELECT * FROM table1 WHERE to_tsvector('public.french', name)
40-
@@ to_tsquery('public.french', 'batifolant');
38+
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('french_hunspell', "name"));
39+
SELECT * FROM table1 WHERE to_tsvector('french_hunspell', name)
40+
@@ to_tsquery('french_hunspell', 'batifolant');
4141
name
4242
------------
4343
batifoler
@@ -46,8 +46,8 @@ SELECT * FROM table1 WHERE to_tsvector('public.french', name)
4646
batifolait
4747
(4 rows)
4848

49-
SELECT * FROM table1 WHERE to_tsvector('public.french', name)
50-
@@ to_tsquery('public.french', 'consentiriez');
49+
SELECT * FROM table1 WHERE to_tsvector('french_hunspell', name)
50+
@@ to_tsquery('french_hunspell', 'consentiriez');
5151
name
5252
--------------
5353
consentant
File renamed without changes.
File renamed without changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* contrib/hunspell_fr/hunspell_fr--1.0.sql */
2+
3+
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
4+
\echo Use "CREATE EXTENSION hunspell_fr" to load this file. \quit
5+
6+
CREATE TEXT SEARCH DICTIONARY french_hunspell (
7+
TEMPLATE = ispell,
8+
DictFile = fr,
9+
AffFile = fr,
10+
StopWords = french
11+
);
12+
13+
COMMENT ON TEXT SEARCH DICTIONARY french_hunspell IS 'hunspell dictionary for french language';
14+
15+
CREATE TEXT SEARCH CONFIGURATION french_hunspell (
16+
COPY = simple
17+
);
18+
19+
COMMENT ON TEXT SEARCH CONFIGURATION french_hunspell IS 'hunspell configuration for french language';
20+
21+
ALTER TEXT SEARCH CONFIGURATION french_hunspell
22+
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart,
23+
word, hword, hword_part
24+
WITH french_hunspell, french_stem;

contrib/hunspell_fr/sql/hunspell_fr--1.0.sql

Lines changed: 0 additions & 20 deletions
This file was deleted.

contrib/hunspell_fr/sql/hunspell_fr.sql

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ CREATE TABLE table1(name varchar);
44
INSERT INTO table1 VALUES ('batifoler'), ('batifolant'), ('batifole'), ('batifolait'),
55
('consentant'), ('consentir'), ('consentiriez');
66

7-
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.french', t.name) AS d;
7+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('french_hunspell', t.name) AS d;
88

9-
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('public.french', "name"));
10-
SELECT * FROM table1 WHERE to_tsvector('public.french', name)
11-
@@ to_tsquery('public.french', 'batifolant');
12-
SELECT * FROM table1 WHERE to_tsvector('public.french', name)
13-
@@ to_tsquery('public.french', 'consentiriez');
9+
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('french_hunspell', "name"));
10+
SELECT * FROM table1 WHERE to_tsvector('french_hunspell', name)
11+
@@ to_tsquery('french_hunspell', 'batifolant');
12+
SELECT * FROM table1 WHERE to_tsvector('french_hunspell', name)
13+
@@ to_tsquery('french_hunspell', 'consentiriez');
1414

1515
DROP INDEX name_idx;
16-
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('public.french', "name"));
17-
SELECT * FROM table1 WHERE to_tsvector('public.french', name)
18-
@@ to_tsquery('public.french', 'batifolant');
19-
SELECT * FROM table1 WHERE to_tsvector('public.french', name)
20-
@@ to_tsquery('public.french', 'consentiriez');
16+
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('french_hunspell', "name"));
17+
SELECT * FROM table1 WHERE to_tsvector('french_hunspell', name)
18+
@@ to_tsquery('french_hunspell', 'batifolant');
19+
SELECT * FROM table1 WHERE to_tsvector('french_hunspell', name)
20+
@@ to_tsquery('french_hunspell', 'consentiriez');

contrib/hunspell_nl_nl/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EXTENSION = hunspell_nl_nl
2-
DATA = sql/hunspell_nl_nl--1.0.sql
2+
DATA = hunspell_nl_nl--1.0.sql
33

4-
DATA_TSEARCH = dict/nl_nl.affix dict/nl_nl.dict
4+
DATA_TSEARCH = nl_nl.affix nl_nl.dict
55

66
REGRESS = hunspell_nl_nl
77

0 commit comments

Comments
 (0)