Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit73a07e3

Browse files
authored
Merge pull request#74 from cybertec-postgresql/spoint3_fetch
Spoint3 fetch
2 parents1066514 +c2a2351 commit73a07e3

File tree

13 files changed

+89
-102
lines changed

13 files changed

+89
-102
lines changed

‎Makefile‎

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ DATA_built = $(RELEASE_SQL) \
3030
pg_sphere--1.2.1--1.2.2.sql\
3131
pg_sphere--1.2.2--1.2.3.sql\
3232
pg_sphere--1.2.3--1.3.0.sql\
33-
pg_sphere--1.3.0--1.3.1.sql
33+
pg_sphere--1.3.0--1.3.1.sql\
34+
pg_sphere--1.3.1--1.3.2.sql
3435

3536
DOCS = README.pg_sphere COPYRIGHT.pg_sphere
3637
REGRESS = init tables points euler circle line ellipse poly path box index\
@@ -41,8 +42,6 @@ ifneq ($(USE_HEALPIX),0)
4142
REGRESS += healpix moc mocautocast
4243
endif
4344

44-
REGRESS_9_5 = index_9.5# experimental for spoint3
45-
4645
TESTS = init_test tables points euler circle line ellipse poly path box\
4746
index contains_ops contains_ops_compat bounding_box_gist gnomo\
4847
epochprop contains overlaps spoint_brin sbox_brin
@@ -83,8 +82,6 @@ endif
8382

8483
PGS_SQL += pgs_epochprop.sql
8584

86-
PGS_SQL_9_5 = pgs_9.5.sql# experimental for spoint3
87-
8885
ifdefUSE_PGXS
8986
ifndef PG_CONFIG
9087
PG_CONFIG = pg_config
@@ -111,18 +108,9 @@ endif
111108
healpix_bare/healpix_bare.o : healpix_bare/healpix_bare.c
112109
$(COMPILE.c) -Wno-declaration-after-statement -o$@$^
113110

114-
# experimental for spoint3
115111
pg_version :=$(word 2,$(shell$(PG_CONFIG) --version))
116-
pg_version_9_5_plus =$(if$(filter-out 9.1% 9.2% 9.3% 9.4%,$(pg_version)),y,n)
117112
has_explain_summary =$(if$(filter-out 9.%,$(pg_version)),y,n)
118113

119-
## the use of spoint 3 is too experimental and preliminary:
120-
#ifeq ($(pg_version_9_5_plus),y)
121-
#REGRESS += $(REGRESS_9_5)
122-
#TESTS += $(REGRESS_9_5)
123-
#PGS_SQL += $(PGS_SQL_9_5)
124-
#endif
125-
126114
crushtest: REGRESS +=$(CRUSH_TESTS)
127115
crushtest: installcheck
128116

@@ -258,6 +246,9 @@ pg_sphere--1.2.3--1.3.0.sql: pgs_brin.sql.in
258246
pg_sphere--1.3.0--1.3.1.sql:
259247
cat upgrade_scripts/$@.in>$@
260248

249+
pg_sphere--1.3.1--1.3.2.sql:
250+
cat upgrade_scripts/$@.in>$@
251+
261252
# end of local stuff
262253

263254
src/sscan.o : src/sparse.c

‎Makefile.common.mk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
#----------------------------------------------------------------------------
66

77
EXTENSION := pg_sphere
8-
PGSPHERE_VERSION := 1.3.1
8+
PGSPHERE_VERSION := 1.3.2

‎expected/index.out‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,64 @@ SELECT count(*) FROM spheretmp4 WHERE l && scircle '<(1,1),0.3>' ;
134134
40
135135
(1 row)
136136

137+
-- test spoint3 operator class with and without index-only scan
138+
SET enable_bitmapscan = OFF;
139+
SET enable_indexonlyscan = ON;
140+
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
141+
QUERY PLAN
142+
--------------------------------------------------------
143+
Aggregate
144+
-> Index Only Scan using spoint3_idx on spheretmp1b
145+
Index Cond: (p <@ '<(1 , 1) , 0.3>'::scircle)
146+
(3 rows)
147+
148+
SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
149+
count
150+
-------
151+
32
152+
(1 row)
153+
154+
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
155+
QUERY PLAN
156+
--------------------------------------------------------
157+
Aggregate
158+
-> Index Only Scan using spoint3_idx on spheretmp1b
159+
Index Cond: (p = '(3.09 , 1.25)'::spoint)
160+
(3 rows)
161+
162+
SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
163+
count
164+
-------
165+
4
166+
(1 row)
167+
168+
SET enable_bitmapscan = ON;
169+
SET enable_indexonlyscan = OFF;
170+
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
171+
QUERY PLAN
172+
-------------------------------------------------------
173+
Aggregate
174+
-> Index Scan using spoint3_idx on spheretmp1b
175+
Index Cond: (p <@ '<(1 , 1) , 0.3>'::scircle)
176+
(3 rows)
177+
178+
SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
179+
count
180+
-------
181+
32
182+
(1 row)
183+
184+
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
185+
QUERY PLAN
186+
---------------------------------------------------
187+
Aggregate
188+
-> Index Scan using spoint3_idx on spheretmp1b
189+
Index Cond: (p = '(3.09 , 1.25)'::spoint)
190+
(3 rows)
191+
192+
SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
193+
count
194+
-------
195+
4
196+
(1 row)
197+

‎expected/index_9.5.out‎

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

‎expected/init.out‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ CREATE EXTENSION pg_sphere;
66
select pg_sphere_version();
77
pg_sphere_version
88
-------------------
9-
1.3.1
9+
1.3.2
1010
(1 row)
1111

‎expected/init_test_healpix.out.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
psql:pg_sphere.test.sql:9684: NOTICE: return type smoc is only a shell
2-
psql:pg_sphere.test.sql:9690: NOTICE: argument type smoc is only a shell
1+
psql:pg_sphere.test.sql:9685: NOTICE: return type smoc is only a shell
2+
psql:pg_sphere.test.sql:9691: NOTICE: argument type smoc is only a shell

‎index_9.5‎

Whitespace-only changes.
File renamed without changes.

‎pg_sphere.control‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pg_sphere extension
22
comment = 'spherical objects with useful functions, operators and index support'
3-
default_version = '1.3.1'
3+
default_version = '1.3.2'
44
module_pathname = '$libdir/pg_sphere'
55
relocatable = true

‎pgs_gist_spoint3.sql.in‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ CREATE OPERATOR CLASS spoint3
6666
FUNCTION 6 g_spoint3_picksplit (internal, internal),
6767
FUNCTION 7 g_spoint3_same (bytea, bytea, internal),
6868
FUNCTION 8 g_spoint3_distance (internal, internal, int4, oid),
69+
FUNCTION 9 (spoint, spoint) g_spoint3_fetch (internal),
6970
STORAGEpointkey;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp