Skip to content

Commit bdc37d1

Browse files
Markus Nullmeiermsdemlei
Markus Nullmeier
authored andcommitted
pgsphere_1.1.4.916
1 parent b9b4431 commit bdc37d1

File tree

81 files changed

+24437
-48
lines changed

Some content is hidden

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

81 files changed

+24437
-48
lines changed

Makefile

Lines changed: 141 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,44 @@ MODULE_big = pg_sphere
88
OBJS = sscan.o sparse.o sbuffer.o vector3d.o point.o \
99
euler.o circle.o line.o ellipse.o polygon.o \
1010
path.o box.o output.o gq_cache.o gist.o key.o \
11-
gnomo.o
11+
gnomo.o healpix.o moc.o process_moc.o
1212

1313
EXTENSION = pg_sphere
14-
DATA_built = pg_sphere--1.0.sql
14+
RELEASE_SQL = $(EXTENSION)--1.1.5beta4gavo.sql
15+
DATA_built = $(RELEASE_SQL) \
16+
pg_sphere--unpackaged--1.1.5beta0gavo.sql \
17+
pg_sphere--1.0--1.0_gavo.sql \
18+
pg_sphere--1.0_gavo--1.1.5beta0gavo.sql \
19+
pg_sphere--1.1.5beta0gavo--1.1.5beta2gavo.sql \
20+
pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql
21+
1522
DOCS = README.pg_sphere COPYRIGHT.pg_sphere
1623
REGRESS = init tables points euler circle line ellipse poly path box index \
17-
contains_ops contains_ops_compat bounding_box_gist gnomo
24+
contains_ops contains_ops_compat bounding_box_gist gnomo healpix \
25+
moc
26+
27+
REGRESS_9_5 = index_9.5 # experimental for spoint3
28+
29+
TESTS = init_test tables points euler circle line ellipse poly path box index \
30+
contains_ops contains_ops_compat bounding_box_gist gnomo healpix \
31+
moc
1832

19-
EXTRA_CLEAN = pg_sphere--1.0.sql $(PGS_SQL)
33+
SHLIB_LINK += -lchealpix
34+
# no support for CXXFLAGS in PGXS
35+
CXXFLAGS = -Wall -Wpointer-arith -Wendif-labels \
36+
-Wmissing-format-attribute -Wformat-security -g -O0 -fpic
2037

21-
CRUSH_TESTS = init_extended circle_extended
38+
EXTRA_CLEAN = $(PGS_SQL) pg_sphere.test.sql
39+
40+
CRUSH_TESTS = init_extended circle_extended
2241

2342
# order of sql files is important
24-
PGS_SQL = pgs_types.sql pgs_point.sql pgs_euler.sql pgs_circle.sql \
43+
PGS_SQL = pgs_types.sql pgs_point.sql pgs_euler.sql pgs_circle.sql \
2544
pgs_line.sql pgs_ellipse.sql pgs_polygon.sql pgs_path.sql \
2645
pgs_box.sql pgs_contains_ops.sql pgs_contains_ops_compat.sql \
27-
pgs_gist.sql gnomo.sql \
46+
pgs_gist.sql gnomo.sql pgs_gist_pointkey.sql \
47+
healpix.sql pgs_gist_spoint3.sql pgs_moc_type.sql pgs_moc_compat.sql
48+
PGS_SQL_9_5 = pgs_9.5.sql # experimental for spoint3
2849

2950
ifdef USE_PGXS
3051
ifndef PG_CONFIG
@@ -40,11 +61,122 @@ else
4061
include $(top_srcdir)/contrib/contrib-global.mk
4162
endif
4263

64+
# link a second time as PGXS does not allow to change the linker
65+
PGS_LINKER = g++ $(CXXFLAGS) $(filter-out $(CC) $(CFLAGS), $(LINK.shared))
66+
pgs_link: $(shlib) $(OBJS) | $(SHLIB_PREREQS)
67+
$(PGS_LINKER) -o $(shlib) $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK)
68+
69+
# experimental for spoint3
70+
pg_version := $(word 2,$(shell $(PG_CONFIG) --version))
71+
pg_version_9_5_plus = $(if $(filter-out 9.1% 9.2% 9.3% 9.4%,$(pg_version)),y,n)
72+
#
73+
74+
## the use of spoint 3 is too experimental and preliminary:
75+
#ifeq ($(pg_version_9_5_plus),y)
76+
# REGRESS += $(REGRESS_9_5)
77+
# TESTS += $(REGRESS_9_5)
78+
# PGS_SQL += $(PGS_SQL_9_5)
79+
#endif
80+
4381
crushtest: REGRESS += $(CRUSH_TESTS)
4482
crushtest: installcheck
4583

46-
pg_sphere--1.0.sql: $(addsuffix .in, $(PGS_SQL))
47-
cat $^ > $@
84+
85+
ifeq ($(pg_version_9_5_plus),y)
86+
PGS_TMP_DIR = --temp-instance=tmp_check
87+
else
88+
PGS_TMP_DIR = --temp-install=tmp_check --top-builddir=test_top_build_dir
89+
endif
90+
91+
test: pg_sphere.test.sql sql/init_test.sql
92+
$(pg_regress_installcheck) $(PGS_TMP_DIR) $(REGRESS_OPTS) $(TESTS)
93+
94+
pg_sphere.test.sql: $(RELEASE_SQL) $(shlib)
95+
tail -n+3 $< | sed 's,MODULE_PATHNAME,$(realpath $(shlib)),g' >$@
96+
97+
98+
$(RELEASE_SQL): $(addsuffix .in, $(RELEASE_SQL) $(PGS_SQL)) pgs_link
99+
cat $(filter-out pgs_link, $^) > $@
100+
101+
# for "create extension from unpacked*":
102+
103+
UPGRADE_UNP_COMMON = pgs_types.sql pgs_point.sql pgs_euler.sql pgs_circle.sql \
104+
pgs_line.sql pgs_ellipse.sql pgs_polygon.sql pgs_path.sql \
105+
pgs_box.sql pgs_contains_ops_compat.sql pgs_gist.sql \
106+
pgs_gist_contains_ops.sql contains-ops-fixes-1.sql
107+
108+
AUGMENT_UNP_COMMON = upgrade_scripts/pgs_pre111.sql pgs_contains_ops.sql \
109+
gnomo.sql
110+
# for vanilla 1.1.1 users
111+
AUGMENT_UNP_111 = $(AUGMENT_UNP_COMMON) pgs_gist_pointkey.sql
112+
113+
# for 1.1.2+ users: 'from unpacked_1.1.2plus'
114+
AUGMENT_UNP_FOR_112plus = $(AUGMENT_UNP_COMMON)
115+
UPGRADE_UNP_FOR_112plus = pgs_gist_pointkey.sql pgs_gist_drop_spoint2.sql.in
116+
117+
# for "alter extension":
118+
119+
# TODO: add dynamic pl/pgsql to do perform an additional
120+
# "ALTER EXTENSION pg_sphere UPDATE TO '1.1.5_from_before_2016-02-07';"
121+
# if required.
122+
#
123+
# default 1.0 (after 2016-02-07) -> 1.1.5
124+
UPGRADE_1_0_PRE_xxxxxx = contains-ops-fixes-2.sql
125+
# '1.1.5_from_2015-08-31'
126+
AUGMENT_1_0_PRE_AAF2D5 = pgs_contains_ops.sql gnomo.sql
127+
UPGRADE_1_0_PRE_AAF2D5 = contains-ops-fixes-1.sql pgs_gist_drop_spoint2.sql.in \
128+
pgs_gist_contains_ops.sql
129+
130+
# vanilla 'create from unpackaged' must assume 1.1.1
131+
# ...
132+
133+
# create "create extension from unpacked*" files
134+
135+
# create "alter extension" files
136+
137+
138+
ifeq ($(pg_version_9_5_plus),y)
139+
# 1.1.1.5 -> 1.1.5.1 for Postgres 9.5+ features
140+
else
141+
endif
142+
143+
# local stuff follows here, next will be "beta2"
144+
145+
AUGMENT_GAVO_111 = $(AUGMENT_UNP_111) healpix.sql # for vanilla 1.1.1 users
146+
UPGRADE_GAVO_111 = $(UPGRADE_UNP_COMMON)
147+
148+
# add new Healpix functions and experimental spoint3
149+
AUGMENT_FROM_GAVO = healpix.sql pgs_gist_spoint3.sql
150+
151+
AUGMENT_UNP_115B0G = $(AUGMENT_UNP_111) $(AUGMENT_FROM_GAVO)
152+
UPGRADE_UNP_115B0G = $(UPGRADE_UNP_COMMON)
153+
154+
AUGMENT_1_0_115B0G = $(AUGMENT_FROM_GAVO)
155+
UPGRADE_1_0_115B0G = contains-ops-fixes-2.sql pgs_gist_drop_spoint2.sql
156+
157+
# test installation 0
158+
pg_sphere--unpackaged--1.1.5beta0gavo.sql: $(addsuffix .in, \
159+
$(AUGMENT_GAVO_111) \
160+
$(addprefix upgrade_scripts/, $(UPGRADE_GAVO_111)))
161+
cat upgrade_scripts/$@.in $^ > $@
162+
163+
# (The upgrade of test installation A has been completed.)
164+
165+
# test installation B (generic)
166+
pg_sphere--1.0--1.0_gavo.sql: # dummy upgrade to allow for descriptive names
167+
cat upgrade_scripts/$@.in > $@
168+
pg_sphere--1.0_gavo--1.1.5beta0gavo.sql: $(addsuffix .in, \
169+
$(AUGMENT_1_0_115B0G) \
170+
$(addprefix upgrade_scripts/, $(UPGRADE_1_0_115B0G)))
171+
cat upgrade_scripts/$@.in $^ > $@
172+
173+
pg_sphere--1.1.5beta0gavo--1.1.5beta2gavo.sql: pgs_moc_type.sql.in
174+
cat upgrade_scripts/$@.in $^ > $@
175+
176+
pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql: pgs_moc_compat.sql.in
177+
cat upgrade_scripts/$@.in $^ > $@
178+
179+
# end of local stuff
48180

49181
sscan.o : sparse.c
50182

README.GAVO

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
******* NEW GAVO PGSPHERE BETA RELEASE, PLEASE READ CAREFULLY. *******
2+
3+
You must apply one of the follwing upgrade commands to all of
4+
your PostgreSQL databases using PgSphere to make this release of
5+
PgSphere work properly! Let us assume your database is named
6+
'gavo', then:
7+
8+
-- first, run the following shell command
9+
psql gavo -c '\dx'|grep pg_sphere
10+
11+
-- if this outputs a line starting with ' pg_sphere',
12+
then please run the command
13+
psql gavo -c "ALTER EXTENSION pg_sphere UPDATE TO '1.1.5beta4gavo';"
14+
to upgrade your database to this latest version of PgSphere.
15+
16+
-- else, if nothing is output from the first command, then
17+
you apparently have a somewhat older first-time installation of
18+
PgSphere within your database. In this case, please run the command
19+
psql gavo -c "CREATE EXTENSION pg_sphere FROM unpackaged;"
20+
to upgrade your database to this latest version of PgSphere.
21+

doc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ html : pg_sphere.xml $(ALLSGML) pg_sphere.dsl
4747
@rm -rf html
4848
mkdir html
4949
mkdir html/img
50-
cp img/*.jpg html/img
50+
cp img/*.jpg img/*.png html/img
5151
cp pg_sphere.css html
52-
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d pg_sphere.dsl -i html -t sgml $(XMLDCL) $<
52+
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -b UTF-8 -d pg_sphere.dsl -i html -t sgml $(XMLDCL) $<
5353
mv *.html html
5454

5555
pg_sphere.tex : pg_sphere.xml $(ALLSGML) pg_sphere.dsl

doc/img/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ eps : $(EPS)
1111
%.eps: %.jpg
1212
$(CONVERT) $< eps:$@
1313

14+
%.eps: %.png
15+
$(CONVERT) $< eps:$@
16+
1417
clean :
1518
rm -f $(EPS)

doc/img/logo.jpg

-7.03 KB
Binary file not shown.

doc/img/logo.png

95.4 KB
Loading

doc/img/logo.xcf

20.2 KB
Binary file not shown.

doc/operators.sgm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@
161161
queries using binary operators returning
162162
<emphasis>true</emphasis> or <emphasis>false</emphasis>:
163163
</para>
164+
<para>
165+
<screen>
166+
</screen>
167+
</para>
164168
<table frame="all" rowsep="1" colsep="1">
165169
<title>Contain and overlap operators</title>
166170
<tgroup cols="2" colsep="1" rowsep="1">

doc/pg_sphere.dsl-dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ Stylesheet//EN" CDATA DSSSL>
194194
(define %html-header-tags%
195195
(list
196196
(list "META" '("NAME" "creation") (list "CONTENT" (time->string (time) #t)))
197+
'("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=utf-8"))
197198
)
198199
)
199200

@@ -258,7 +259,7 @@ Stylesheet//EN" CDATA DSSSL>
258259

259260
(define %graphic-extensions%
260261
;; graphic extensions allowed
261-
'("jpg" "jpeg"))
262+
'("jpg" "jpeg" "png"))
262263

263264
(define %graphic-default-extension%
264265
"jpg")

doc/pg_sphere.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="iso-8859-1"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22

33
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
44
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
@@ -22,7 +22,7 @@
2222
<!ENTITY graph1006 "img/spath.jpg">
2323
<!ENTITY graph1007 "img/spoly.jpg">
2424
<!ENTITY graph1008 "img/sbox.jpg">
25-
<!ENTITY graph1009 "img/logo.jpg">
25+
<!ENTITY graph1009 "img/logo.png">
2626

2727
]>
2828

@@ -39,7 +39,7 @@
3939
<para>
4040
<mediaobject>
4141
<imageobject>
42-
<imagedata fileref="&graph1009;" width="225px" format="JPEG"/>
42+
<imagedata fileref="&graph1009;" width="168px" format="PNG"/>
4343
</imageobject>
4444
</mediaobject>
4545
</para>

0 commit comments

Comments
 (0)