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

Commitdad295f

Browse files
author
Vitaly Davydov
committed
[ISSUE-7] Added PARALLEL SAFE mark to pgSphere functions
The patch is based on Feodor Sigaev's branch (parallel_safe).Some adjustments were made to fix compilation. Checked the number ofchanges in function declarations and the number of function alterationsin the upgrade script pg_sphere--1.2.1--1.2.2.sql.in (the numbersshould match).
1 parent472b209 commitdad295f

21 files changed

+712
-359
lines changed

‎Makefile

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

33
# the base dir name may be changed depending on git clone command
44
SRC_DIR =$(shell basename$(shell pwd))
@@ -19,7 +19,8 @@ DATA_built = $(RELEASE_SQL) \
1919
pg_sphere--1.1.5beta0gavo--1.1.5beta2gavo.sql\
2020
pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql\
2121
pg_sphere--1.1.5beta4gavo--1.2.0.sql\
22-
pg_sphere--1.2.0--1.2.1.sql
22+
pg_sphere--1.2.0--1.2.1.sql\
23+
pg_sphere--1.2.1--1.2.2.sql
2324

2425
DOCS = README.pg_sphere COPYRIGHT.pg_sphere
2526
REGRESS = init tables points euler circle line ellipse poly path box index\
@@ -209,6 +210,12 @@ ifeq ($(has_parallel), n)
209210
sed -i -e '/PARALLEL/d' $@# version $(pg_version) does not have support for PARALLEL
210211
endif
211212

213+
pg_sphere--1.2.1--1.2.2.sql: upgrade_scripts/pg_sphere--1.2.1--1.2.2.sql.in
214+
cat$^>$@
215+
ifeq ($(has_parallel), n)
216+
sed -i -e '/PARALLEL/d' $@# version $(pg_version) does not have support for PARALLEL
217+
endif
218+
212219
# end of local stuff
213220

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

‎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.2.1
9+
1.2.2
1010
(1 row)
1111

‎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';

‎healpix.sql.in

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,97 +3,97 @@
33
CREATE OR REPLACE FUNCTION nest2ring(integer, bigint)
44
RETURNS bigint
55
AS 'MODULE_PATHNAME', 'pg_nest2ring'
6-
LANGUAGE C IMMUTABLE STRICT;
6+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
77
COMMENT ON FUNCTION nest2ring(integer, bigint) IS
88
'converts nested Healpix index to a ring Healpix index for the specified integer level (first argument)';
99

1010
CREATE OR REPLACE FUNCTION ring2nest(integer, bigint)
1111
RETURNS bigint
1212
AS 'MODULE_PATHNAME', 'pg_ring2nest'
13-
LANGUAGE C IMMUTABLE STRICT;
13+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
1414
COMMENT ON FUNCTION ring2nest(integer, bigint) IS
1515
'converts ringe Healpix index to a nested Healpix index for the specified integer level (first argument)';
1616

1717
CREATE OR REPLACE FUNCTION healpix_convert_nest(integer, integer, bigint)
1818
RETURNS bigint
1919
AS 'MODULE_PATHNAME'
20-
LANGUAGE C IMMUTABLE STRICT;
20+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
2121
COMMENT ON FUNCTION healpix_convert_nest(integer, integer, bigint) IS
2222
'converts nested Healpix index (last argument) from level of second argument to level of first argument';
2323

2424
CREATE OR REPLACE FUNCTION healpix_convert_ring(integer, integer, bigint)
2525
RETURNS bigint
2626
AS 'MODULE_PATHNAME'
27-
LANGUAGE C IMMUTABLE STRICT;
27+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
2828
COMMENT ON FUNCTION healpix_convert_ring(integer, integer, bigint) IS
2929
'converts ring Healpix index (last argument) from level of second argument to level of first argument';
3030

3131
CREATE OR REPLACE FUNCTION nside2order(bigint)
3232
RETURNS integer
3333
AS 'MODULE_PATHNAME', 'pg_nside2order'
34-
LANGUAGE C IMMUTABLE STRICT;
34+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
3535
COMMENT ON FUNCTION nside2order(bigint) IS
3636
'returns integer part of base-two logarithm of argument for powers of two up to 29';
3737

3838
CREATE OR REPLACE FUNCTION order2nside(integer)
3939
RETURNS bigint
4040
AS 'MODULE_PATHNAME', 'pg_order2nside'
41-
LANGUAGE C IMMUTABLE STRICT;
41+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
4242
COMMENT ON FUNCTION order2nside(integer) IS
4343
'returns power of two for non-negative values up to 29';
4444

4545
CREATE OR REPLACE FUNCTION nside2npix(bigint)
4646
RETURNS bigint
4747
AS 'MODULE_PATHNAME', 'pg_nside2npix'
48-
LANGUAGE C IMMUTABLE STRICT;
48+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
4949
COMMENT ON FUNCTION nside2npix(bigint) IS
5050
'returns 12 * nside ^ 2, the number of Healpix elements for the nside parameter';
5151

5252
CREATE OR REPLACE FUNCTION npix2nside(bigint)
5353
RETURNS bigint
5454
AS 'MODULE_PATHNAME', 'pg_npix2nside'
55-
LANGUAGE C IMMUTABLE STRICT;
55+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
5656
COMMENT ON FUNCTION npix2nside(bigint) IS
5757
'returns the nside parameter correspondig to the number of Healpix elements';
5858

5959
CREATE OR REPLACE FUNCTION healpix_nest(integer, spoint)
6060
RETURNS bigint
6161
AS 'MODULE_PATHNAME'
62-
LANGUAGE C IMMUTABLE STRICT;
62+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
6363
COMMENT ON FUNCTION healpix_nest(integer, spoint) IS
6464
'nested Healpix index of a spherical point for the specified integer level (first argument)';
6565

6666
CREATE OR REPLACE FUNCTION healpix_ring(integer, spoint)
6767
RETURNS bigint
6868
AS 'MODULE_PATHNAME'
69-
LANGUAGE C IMMUTABLE STRICT;
69+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
7070
COMMENT ON FUNCTION healpix_ring(integer, spoint) IS
7171
'Healpix ring index of a spherical point for the specified integer level (first argument)';
7272

7373
CREATE OR REPLACE FUNCTION centre_of_healpix_nest(integer, bigint)
7474
RETURNS spoint
7575
AS 'MODULE_PATHNAME', 'inv_healpix_nest'
76-
LANGUAGE C IMMUTABLE STRICT;
76+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
7777
COMMENT ON FUNCTION centre_of_healpix_nest(integer, bigint) IS
7878
'spherical point designating the centre of a nested Healpix element for the specified integer level (first argument)';
7979

8080
CREATE OR REPLACE FUNCTION centre_of_healpix_ring(integer, bigint)
8181
RETURNS spoint
8282
AS 'MODULE_PATHNAME', 'inv_healpix_ring'
83-
LANGUAGE C IMMUTABLE STRICT;
83+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
8484
COMMENT ON FUNCTION centre_of_healpix_ring(integer, bigint) IS
8585
'spherical point designating the centre of a ring Healpix element for the specified integer level (first argument)';
8686

8787
CREATE OR REPLACE FUNCTION center_of_healpix_nest(integer, bigint)
8888
RETURNS spoint
8989
AS 'MODULE_PATHNAME', 'inv_healpix_nest'
90-
LANGUAGE C IMMUTABLE STRICT;
90+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
9191
COMMENT ON FUNCTION center_of_healpix_nest(integer, bigint) IS
9292
'spherical point designating the center of a nested Healpix element for the specified integer level (first argument)';
9393

9494
CREATE OR REPLACE FUNCTION center_of_healpix_ring(integer, bigint)
9595
RETURNS spoint
9696
AS 'MODULE_PATHNAME', 'inv_healpix_ring'
97-
LANGUAGE C IMMUTABLE STRICT;
97+
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
9898
COMMENT ON FUNCTION center_of_healpix_ring(integer, bigint) IS
9999
'spherical point designating the center of a ring Healpix element for the specified integer level (first argument)';

‎pg_sphere--1.2.2.sql.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- complain if this script is run via psql
2+
\echo Use "CREATE EXTENSION pg_sphere" to load this file. \quit

‎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.2.1'
3+
default_version = '1.2.2'
44
module_pathname = '$libdir/pg_sphere'
55
relocatable = true

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp