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

Spoint3 fetch#74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletionsMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,7 +30,8 @@ DATA_built = $(RELEASE_SQL) \
pg_sphere--1.2.1--1.2.2.sql \
pg_sphere--1.2.2--1.2.3.sql \
pg_sphere--1.2.3--1.3.0.sql \
pg_sphere--1.3.0--1.3.1.sql
pg_sphere--1.3.0--1.3.1.sql \
pg_sphere--1.3.1--1.3.2.sql

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

REGRESS_9_5 = index_9.5 # experimental for spoint3

TESTS = init_test tables points euler circle line ellipse poly path box \
index contains_ops contains_ops_compat bounding_box_gist gnomo \
epochprop contains overlaps spoint_brin sbox_brin
Expand DownExpand Up@@ -83,8 +82,6 @@ endif

PGS_SQL += pgs_epochprop.sql

PGS_SQL_9_5 = pgs_9.5.sql # experimental for spoint3

ifdef USE_PGXS
ifndef PG_CONFIG
PG_CONFIG = pg_config
Expand All@@ -111,18 +108,9 @@ endif
healpix_bare/healpix_bare.o : healpix_bare/healpix_bare.c
$(COMPILE.c) -Wno-declaration-after-statement -o $@ $^

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

## the use of spoint 3 is too experimental and preliminary:
#ifeq ($(pg_version_9_5_plus),y)
#REGRESS += $(REGRESS_9_5)
#TESTS += $(REGRESS_9_5)
#PGS_SQL += $(PGS_SQL_9_5)
#endif

crushtest: REGRESS += $(CRUSH_TESTS)
crushtest: installcheck

Expand DownExpand Up@@ -258,6 +246,9 @@ pg_sphere--1.2.3--1.3.0.sql: pgs_brin.sql.in
pg_sphere--1.3.0--1.3.1.sql:
cat upgrade_scripts/$@.in > $@

pg_sphere--1.3.1--1.3.2.sql:
cat upgrade_scripts/$@.in > $@

# end of local stuff

src/sscan.o : src/sparse.c
Expand Down
2 changes: 1 addition & 1 deletionMakefile.common.mk
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,4 +5,4 @@
#----------------------------------------------------------------------------

EXTENSION := pg_sphere
PGSPHERE_VERSION := 1.3.1
PGSPHERE_VERSION := 1.3.2
61 changes: 61 additions & 0 deletionsexpected/index.out
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -134,3 +134,64 @@ SELECT count(*) FROM spheretmp4 WHERE l && scircle '<(1,1),0.3>' ;
40
(1 row)

-- test spoint3 operator class with and without index-only scan
SET enable_bitmapscan = OFF;
SET enable_indexonlyscan = ON;
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
QUERY PLAN
--------------------------------------------------------
Aggregate
-> Index Only Scan using spoint3_idx on spheretmp1b
Index Cond: (p <@ '<(1 , 1) , 0.3>'::scircle)
(3 rows)

SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
count
-------
32
(1 row)

EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
QUERY PLAN
--------------------------------------------------------
Aggregate
-> Index Only Scan using spoint3_idx on spheretmp1b
Index Cond: (p = '(3.09 , 1.25)'::spoint)
(3 rows)

SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
count
-------
4
(1 row)

SET enable_bitmapscan = ON;
SET enable_indexonlyscan = OFF;
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
QUERY PLAN
-------------------------------------------------------
Aggregate
-> Index Scan using spoint3_idx on spheretmp1b
Index Cond: (p <@ '<(1 , 1) , 0.3>'::scircle)
(3 rows)

SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
count
-------
32
(1 row)

EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
QUERY PLAN
---------------------------------------------------
Aggregate
-> Index Scan using spoint3_idx on spheretmp1b
Index Cond: (p = '(3.09 , 1.25)'::spoint)
(3 rows)

SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
count
-------
4
(1 row)

62 changes: 0 additions & 62 deletionsexpected/index_9.5.out
View file
Open in desktop

This file was deleted.

2 changes: 1 addition & 1 deletionexpected/init.out
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,6 @@ CREATE EXTENSION pg_sphere;
select pg_sphere_version();
pg_sphere_version
-------------------
1.3.1
1.3.2
(1 row)

4 changes: 2 additions & 2 deletionsexpected/init_test_healpix.out.in
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
psql:pg_sphere.test.sql:9684: NOTICE: return type smoc is only a shell
psql:pg_sphere.test.sql:9690: NOTICE: argument type smoc is only a shell
psql:pg_sphere.test.sql:9685: NOTICE: return type smoc is only a shell
psql:pg_sphere.test.sql:9691: NOTICE: argument type smoc is only a shell
Empty file removedindex_9.5
View file
Open in desktop
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletionpg_sphere.control
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
# pg_sphere extension
comment = 'spherical objects with useful functions, operators and index support'
default_version = '1.3.1'
default_version = '1.3.2'
module_pathname = '$libdir/pg_sphere'
relocatable = true
1 change: 1 addition & 0 deletionspgs_gist_spoint3.sql.in
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -66,4 +66,5 @@ CREATE OPERATOR CLASS spoint3
FUNCTION 6 g_spoint3_picksplit (internal, internal),
FUNCTION 7 g_spoint3_same (bytea, bytea, internal),
FUNCTION 8 g_spoint3_distance (internal, internal, int4, oid),
FUNCTION 9 (spoint, spoint) g_spoint3_fetch (internal),
STORAGEpointkey;
17 changes: 17 additions & 0 deletionssql/index.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,3 +59,20 @@ SELECT count(*) FROM spheretmp4 WHERE l @ scircle '<(1,1),0.3>' ;

SELECT count(*) FROM spheretmp4 WHERE l && scircle '<(1,1),0.3>' ;

-- test spoint3 operator class with and without index-only scan

SET enable_bitmapscan = OFF;
SET enable_indexonlyscan = ON;

EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';

SET enable_bitmapscan = ON;
SET enable_indexonlyscan = OFF;

EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
18 changes: 0 additions & 18 deletionssql/index_9.5.sql
View file
Open in desktop

This file was deleted.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
-- add functionality that is only available for PostgreSQL 9.5+


-- add "fetch" support function to enable index-only scans for spoint3

ALTER OPERATOR FAMILY spoint3 USING gist ADD
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp