Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e7d241c

Browse files
committed
mark all possible function as parallel safe, bump 1.2.1
1 parent d3d13fb commit e7d241c

19 files changed

+935
-326
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PGSPHERE_VERSION = 1.2.0
1+
PGSPHERE_VERSION = 1.2.1
22

33
# the base dir name may be changed depending on git clone command
44
SRC_DIR = $(shell basename $(shell pwd))
@@ -17,7 +17,8 @@ DATA_built = $(RELEASE_SQL) \
1717
pg_sphere--1.0_gavo--1.1.5beta0gavo.sql \
1818
pg_sphere--1.1.5beta0gavo--1.1.5beta2gavo.sql \
1919
pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql \
20-
pg_sphere--1.1.5beta4gavo--1.2.0.sql
20+
pg_sphere--1.1.5beta4gavo--1.2.0.sql \
21+
pg_sphere--1.2.0--1.2.1.sql
2122

2223
DOCS = README.pg_sphere COPYRIGHT.pg_sphere
2324
REGRESS = init tables points euler circle line ellipse poly path box index \
@@ -197,6 +198,13 @@ ifeq ($(has_parallel), n)
197198
sed -i -e '/PARALLEL/d' $@ # version $(pg_version) does not have support for PARALLEL
198199
endif
199200

201+
pg_sphere--1.2.0--1.2.1.sql: upgrade_scripts/pg_sphere--1.2.0--1.2.1.sql.in
202+
ifeq ($(has_parallel), n)
203+
touch $@
204+
else
205+
cat $^ > $@
206+
endif
207+
200208
# end of local stuff
201209

202210
sscan.o : sparse.c

expected/moc100_4.out

Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
CREATE TABLE moc100 (
2+
ivoid text,
3+
coverage smoc,
4+
ref_system_name text
5+
);
6+
COPY moc100 FROM STDIN;
7+
CREATE INDEX ON moc100 USING GIN (coverage);
8+
SELECT ivoid FROM moc100 WHERE coverage && '4/0' ORDER BY ivoid;
9+
ivoid
10+
------------------------------------------
11+
ivo://byu.arvo/dfbsspec/q/getssa
12+
ivo://cadc.nrc.ca/archive/cfht
13+
ivo://cadc.nrc.ca/archive/hst
14+
ivo://cds.vizier/b/assocdata
15+
ivo://cds.vizier/b/swift
16+
ivo://cds.vizier/i/241
17+
ivo://cds.vizier/iv/12
18+
ivo://cds.vizier/ix/13
19+
ivo://cds.vizier/j/a+a/316/147
20+
ivo://cds.vizier/j/a+as/105/311
21+
ivo://cds.vizier/j/a+as/122/235
22+
ivo://chivo/gaia/q/dr1
23+
ivo://chivo/openngc/q/data
24+
ivo://cxc.harvard.edu/csc
25+
ivo://irsa.ipac/2mass/catalog/psc
26+
ivo://irsa.ipac/2mass/catalog/xsc
27+
ivo://irsa.ipac/2mass/images/asky-ql
28+
ivo://irsa.ipac/cosmos/images
29+
ivo://irsa.ipac/iras/images/issa
30+
ivo://irsa.ipac/mast/scrapbook
31+
ivo://irsa.ipac/spitzer/images/swire
32+
ivo://mssl.ucl.ac.uk/xmmsuss_dsa/xmmsuss
33+
ivo://ned.ipac/sia
34+
ivo://ned.ipac/tap
35+
ivo://svo.cab/cat/gbs
36+
ivo://svo.cab/cat/uves
37+
ivo://svo.cab/cat/xshooter
38+
ivo://vopdc.iap/fss
39+
ivo://vopdc.obspm/imcce/m4ast
40+
ivo://vopdc.obspm/imcce/miriade
41+
ivo://vopdc.obspm/imcce/skybot
42+
ivo://vopdc.obspm/lesia/bestars/besc
43+
ivo://vopdc.obspm/lesia/bestars/bess
44+
ivo://vopdc.obspm/luth/exoplanet
45+
ivo://vopdc.obspm/luth/hess
46+
(35 rows)
47+
48+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
49+
SELECT * FROM moc100 WHERE coverage && '0/';
50+
QUERY PLAN
51+
----------------------------------------------------------------------------------------------------------
52+
Bitmap Heap Scan on moc100 (cost=0.00..4.01 rows=1 width=96) (actual rows=0 loops=1)
53+
Recheck Cond: (coverage && '0/'::smoc)
54+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..0.00 rows=1 width=0) (actual rows=0 loops=1)
55+
Index Cond: (coverage && '0/'::smoc)
56+
Planning:
57+
Buffers: shared hit=5
58+
(6 rows)
59+
60+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
61+
SELECT * FROM moc100 WHERE coverage && '4/0';
62+
QUERY PLAN
63+
--------------------------------------------------------------------------------
64+
Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=35 loops=1)
65+
Filter: (coverage && '4/0'::smoc)
66+
Rows Removed by Filter: 66
67+
Buffers: shared hit=114
68+
Planning:
69+
Buffers: shared hit=1
70+
(6 rows)
71+
72+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
73+
SELECT * FROM moc100 WHERE coverage = '0/0-11';
74+
QUERY PLAN
75+
--------------------------------------------------------------------------------
76+
Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=23 loops=1)
77+
Filter: (coverage = '0/0-11'::smoc)
78+
Rows Removed by Filter: 78
79+
Buffers: shared hit=59
80+
Planning:
81+
Buffers: shared hit=4
82+
(6 rows)
83+
84+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
85+
SELECT * FROM moc100 WHERE coverage = '6/43225,43227';
86+
QUERY PLAN
87+
-------------------------------------------------------------------------------
88+
Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=1 loops=1)
89+
Filter: (coverage = '6/43225 43227'::smoc)
90+
Rows Removed by Filter: 100
91+
Buffers: shared hit=59
92+
Planning:
93+
Buffers: shared hit=1
94+
(6 rows)
95+
96+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
97+
SELECT * FROM moc100 WHERE coverage = '0/';
98+
QUERY PLAN
99+
-------------------------------------------------------------------------------
100+
Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=1 loops=1)
101+
Filter: (coverage = '0/'::smoc)
102+
Rows Removed by Filter: 100
103+
Buffers: shared hit=59
104+
Planning:
105+
Buffers: shared hit=1
106+
(6 rows)
107+
108+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
109+
SELECT * FROM moc100 WHERE coverage <> '0/0-11';
110+
QUERY PLAN
111+
----------------------------------------------------------------------------------
112+
Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=78 loops=1)
113+
Filter: (coverage <> '0/0-11'::smoc)
114+
Rows Removed by Filter: 23
115+
Buffers: shared hit=59
116+
Planning:
117+
Buffers: shared hit=4
118+
(6 rows)
119+
120+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
121+
SELECT * FROM moc100 WHERE coverage <> '6/43225,43227';
122+
QUERY PLAN
123+
-----------------------------------------------------------------------------------
124+
Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=100 loops=1)
125+
Filter: (coverage <> '6/43225 43227'::smoc)
126+
Rows Removed by Filter: 1
127+
Buffers: shared hit=59
128+
Planning:
129+
Buffers: shared hit=1
130+
(6 rows)
131+
132+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
133+
SELECT * FROM moc100 WHERE coverage <> '0/';
134+
QUERY PLAN
135+
-----------------------------------------------------------------------------------
136+
Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=100 loops=1)
137+
Filter: (coverage <> '0/'::smoc)
138+
Rows Removed by Filter: 1
139+
Buffers: shared hit=59
140+
Planning:
141+
Buffers: shared hit=1
142+
(6 rows)
143+
144+
SET enable_seqscan = off;
145+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
146+
SELECT * FROM moc100 WHERE coverage && '4/0';
147+
QUERY PLAN
148+
------------------------------------------------------------------------------------------------------------
149+
Bitmap Heap Scan on moc100 (cost=36.00..40.01 rows=1 width=96) (actual rows=35 loops=1)
150+
Recheck Cond: (coverage && '4/0'::smoc)
151+
Heap Blocks: exact=5
152+
Buffers: shared hit=85
153+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..36.00 rows=1 width=0) (actual rows=35 loops=1)
154+
Index Cond: (coverage && '4/0'::smoc)
155+
Buffers: shared hit=9
156+
Planning:
157+
Buffers: shared hit=1
158+
(9 rows)
159+
160+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
161+
SELECT * FROM moc100 WHERE coverage <@ '4/0';
162+
QUERY PLAN
163+
------------------------------------------------------------------------------------------------------------
164+
Bitmap Heap Scan on moc100 (cost=44.00..48.01 rows=1 width=96) (actual rows=1 loops=1)
165+
Recheck Cond: (coverage <@ '4/0'::smoc)
166+
Rows Removed by Index Recheck: 35
167+
Heap Blocks: exact=5
168+
Buffers: shared hit=33
169+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..44.00 rows=1 width=0) (actual rows=36 loops=1)
170+
Index Cond: (coverage <@ '4/0'::smoc)
171+
Buffers: shared hit=12
172+
Planning:
173+
Buffers: shared hit=4
174+
(10 rows)
175+
176+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
177+
SELECT * FROM moc100 WHERE coverage @> '4/0';
178+
QUERY PLAN
179+
------------------------------------------------------------------------------------------------------------
180+
Bitmap Heap Scan on moc100 (cost=36.00..40.01 rows=1 width=96) (actual rows=28 loops=1)
181+
Recheck Cond: (coverage @> '4/0'::smoc)
182+
Rows Removed by Index Recheck: 1
183+
Heap Blocks: exact=4
184+
Buffers: shared hit=36
185+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..36.00 rows=1 width=0) (actual rows=29 loops=1)
186+
Index Cond: (coverage @> '4/0'::smoc)
187+
Buffers: shared hit=9
188+
Planning:
189+
Buffers: shared hit=4
190+
(10 rows)
191+
192+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
193+
SELECT * FROM moc100 WHERE coverage = '0/0-11';
194+
QUERY PLAN
195+
---------------------------------------------------------------------------------------------------------------
196+
Bitmap Heap Scan on moc100 (cost=98308.01..98312.02 rows=1 width=96) (actual rows=23 loops=1)
197+
Recheck Cond: (coverage = '0/0-11'::smoc)
198+
Rows Removed by Index Recheck: 1
199+
Heap Blocks: exact=2
200+
Buffers: shared hit=24581
201+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..98308.01 rows=1 width=0) (actual rows=24 loops=1)
202+
Index Cond: (coverage = '0/0-11'::smoc)
203+
Buffers: shared hit=24577
204+
Planning:
205+
Buffers: shared hit=1
206+
(10 rows)
207+
208+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
209+
SELECT * FROM moc100 WHERE coverage = '6/43225,43227';
210+
QUERY PLAN
211+
------------------------------------------------------------------------------------------------------------
212+
Bitmap Heap Scan on moc100 (cost=12.01..16.02 rows=1 width=96) (actual rows=1 loops=1)
213+
Recheck Cond: (coverage = '6/43225 43227'::smoc)
214+
Rows Removed by Index Recheck: 28
215+
Heap Blocks: exact=3
216+
Buffers: shared hit=12
217+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..12.01 rows=1 width=0) (actual rows=29 loops=1)
218+
Index Cond: (coverage = '6/43225 43227'::smoc)
219+
Buffers: shared hit=3
220+
Planning:
221+
Buffers: shared hit=1
222+
(10 rows)
223+
224+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
225+
SELECT * FROM moc100 WHERE coverage = '0/';
226+
QUERY PLAN
227+
-----------------------------------------------------------------------------------------------------------
228+
Bitmap Heap Scan on moc100 (cost=12.01..16.02 rows=1 width=96) (actual rows=1 loops=1)
229+
Recheck Cond: (coverage = '0/'::smoc)
230+
Heap Blocks: exact=1
231+
Buffers: shared hit=5
232+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..12.01 rows=1 width=0) (actual rows=1 loops=1)
233+
Index Cond: (coverage = '0/'::smoc)
234+
Buffers: shared hit=4
235+
Planning:
236+
Buffers: shared hit=1
237+
(9 rows)
238+
239+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
240+
SELECT * FROM moc100 WHERE coverage <> '0/0-11';
241+
QUERY PLAN
242+
------------------------------------------------------------------------------------------------------------------
243+
Bitmap Heap Scan on moc100 (cost=98316.77..98323.02 rows=100 width=96) (actual rows=78 loops=1)
244+
Recheck Cond: (coverage <> '0/0-11'::smoc)
245+
Rows Removed by Index Recheck: 23
246+
Heap Blocks: exact=5
247+
Buffers: shared hit=24824
248+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..98316.75 rows=100 width=0) (actual rows=101 loops=1)
249+
Index Cond: (coverage <> '0/0-11'::smoc)
250+
Buffers: shared hit=24762
251+
Planning:
252+
Buffers: shared hit=1
253+
(10 rows)
254+
255+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
256+
SELECT * FROM moc100 WHERE coverage <> '6/43225,43227';
257+
QUERY PLAN
258+
------------------------------------------------------------------------------------------------------------------
259+
Bitmap Heap Scan on moc100 (cost=98316.77..98323.02 rows=100 width=341) (actual rows=100 loops=1)
260+
Recheck Cond: (coverage <> '6/43225 43227'::smoc)
261+
Rows Removed by Index Recheck: 1
262+
Heap Blocks: exact=5
263+
Buffers: shared hit=247
264+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..98316.75 rows=100 width=0) (actual rows=101 loops=1)
265+
Index Cond: (coverage <> '6/43225 43227'::smoc)
266+
Buffers: shared hit=188
267+
Planning:
268+
Buffers: shared hit=10
269+
(10 rows)
270+
271+
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
272+
SELECT * FROM moc100 WHERE coverage <> '0/';
273+
QUERY PLAN
274+
------------------------------------------------------------------------------------------------------------------
275+
Bitmap Heap Scan on moc100 (cost=98316.77..98323.02 rows=100 width=341) (actual rows=100 loops=1)
276+
Recheck Cond: (coverage <> '0/'::smoc)
277+
Rows Removed by Index Recheck: 1
278+
Heap Blocks: exact=5
279+
Buffers: shared hit=245
280+
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..98316.75 rows=100 width=0) (actual rows=101 loops=1)
281+
Index Cond: (coverage <> '0/'::smoc)
282+
Buffers: shared hit=186
283+
Planning:
284+
Buffers: shared hit=1
285+
(10 rows)
286+

gnomo.sql.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
CREATE OR REPLACE FUNCTION gnomonic_proj(spoint, spoint)
44
RETURNS point
55
AS 'MODULE_PATHNAME'
6-
LANGUAGE C IMMUTABLE STRICT;
6+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
77

88
COMMENT ON FUNCTION gnomonic_proj(spoint, spoint) IS
99
'gnomonic projection, the second argument is the tangential point';
1010

1111
CREATE OR REPLACE FUNCTION gnomonic_inv(point, spoint)
1212
RETURNS spoint
1313
AS 'MODULE_PATHNAME'
14-
LANGUAGE C IMMUTABLE STRICT;
14+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
1515

1616
COMMENT ON FUNCTION gnomonic_inv(point, spoint) IS
1717
'inverse of gnomonic projection, the second argument is the tangential point';

0 commit comments

Comments
 (0)