Giter VIP home page Giter VIP logo

pgsphere's People

Contributors

akorotkov avatar df7cb avatar fingel avatar funbringer avatar jankorichter avatar pdowler avatar smonkewitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pgsphere's Issues

Location of canonical source

I'm the packager of pgsphere in Fedora. I can't find the canonical url to download the source code of pgsphere 1.1.1. I used pgfoundry.org but is not working anymore

pgsphere regression test failures on ppc64el

Hi,
building pgsphere on ppc64el on PG 9.2 results in the regression diffs quoted below. All Debian and Ubuntu versions supported by apt.postgresql.org are affected; the diffs look similar for all distributions.
(I haven't yet tried running the regression tests against 9.3+; the package builds find with them, though, but likely the failures are the same. Also, the package builds and tests fine against 9.2..9.6 on amd64 and i386.)
Thanks!

00:01:38.658 ============== running regression test queries        ==============
00:01:38.878 test init                     ... ok
00:01:40.764 test tables                   ... ok
00:01:40.808 test points                   ... FAILED
00:01:40.830 test euler                    ... ok
00:01:40.873 test circle                   ... FAILED
00:01:40.900 test line                     ... ok
00:01:40.959 test ellipse                  ... ok
00:01:41.116 test poly                     ... ok
00:01:41.171 test path                     ... ok
00:01:41.264 test box                      ... ok
00:01:41.342 test index                    ... ok
00:01:41.419 test contains_ops             ... ok
00:01:41.482 test contains_ops_compat      ... ok
00:01:41.528 test bounding_box_gist        ... ok
00:01:41.583 test gnomo                    ... FAILED
00:01:41.583 
00:01:41.583 =======================
00:01:41.584  3 of 15 tests failed. 
00:01:41.584 =======================

00:01:41.616 2017-08-18 11:06:13.578 UTC [6563] postgres@contrib_regression ERROR:  spherepoly_in: more than two points needed at character 14
00:01:41.616 2017-08-18 11:06:13.578 UTC [6563] postgres@contrib_regression STATEMENT:  SELECT spoly '{(10d,0d),(10d,1d)}';
00:01:41.616 2017-08-18 11:06:13.578 UTC [6563] postgres@contrib_regression ERROR:  spherepoly_from_array: a line segment overlaps or polygon too large at character 14
00:01:41.616 2017-08-18 11:06:13.578 UTC [6563] postgres@contrib_regression STATEMENT:  SELECT spoly '{(0d,0d),(10d,10d),(0d,10d),(10d,0d)}';
00:01:41.616 Dropping cluster 9.2/regress ...
00:01:42.711 **** regression.diffs ****
00:01:42.712 *** /tmp/autopkgtest.vJaxRz/tree/expected/points.out	2017-07-28 15:35:48.000000000 +0000
00:01:42.712 --- /tmp/autopkgtest.vJaxRz/tree/results/points.out	2017-08-18 11:06:13.369260219 +0000
00:01:42.712 ***************
00:01:42.712 *** 110,124 ****
00:01:42.713   (1 row)
00:01:42.713   
00:01:42.713   SELECT '( 1h 2m 30s , -1d 2m 30s)'::spoint;
00:01:42.713 !             spoint             
00:01:42.713 ! -------------------------------
00:01:42.713 !  ( 15d 37m 30s , - 1d  2m 30s)
00:01:42.713   (1 row)
00:01:42.713   
00:01:42.713   SELECT '( 0h 2m 30s , -0d 2m 30s)'::spoint;
00:01:42.714 !             spoint             
00:01:42.714 ! -------------------------------
00:01:42.730 !  (  0d 37m 30s , - 0d  2m 30s)
00:01:42.730   (1 row)
00:01:42.730   
00:01:42.730   SELECT '( 0h 2m 30s , 90d 0m 0s)'::spoint;
00:01:42.730 --- 110,124 ----
00:01:42.730   (1 row)
00:01:42.730   
00:01:42.730   SELECT '( 1h 2m 30s , -1d 2m 30s)'::spoint;
00:01:42.736 !                spoint               
00:01:42.736 ! ------------------------------------
00:01:42.736 !  ( 15d 37m 30s , - 0d  0m -956250s)
00:01:42.736   (1 row)
00:01:42.736   
00:01:42.736   SELECT '( 0h 2m 30s , -0d 2m 30s)'::spoint;
00:01:42.736 !               spoint               
00:01:42.738 ! -----------------------------------
00:01:42.738 !  (  0d 37m 30s , - 0d  0m -38250s)
00:01:42.738   (1 row)
00:01:42.738   
00:01:42.738   SELECT '( 0h 2m 30s , 90d 0m 0s)'::spoint;
00:01:42.738 ***************
00:01:42.738 *** 128,136 ****
00:01:42.738   (1 row)
00:01:42.738   
00:01:42.739   SELECT '( 0h 2m 30s ,-90d 0m 0s)'::spoint;
00:01:42.739 !             spoint            
00:01:42.739 ! ------------------------------
00:01:42.739 !  (  0d 37m 30s , -90d  0m 0s)
00:01:42.739   (1 row)
00:01:42.739   
00:01:42.739   SELECT set_sphere_output( 'HMS' );
00:01:42.739 --- 128,136 ----
00:01:42.743   (1 row)
00:01:42.743   
00:01:42.743   SELECT '( 0h 2m 30s ,-90d 0m 0s)'::spoint;
00:01:42.743 !                 spoint                
00:01:42.743 ! --------------------------------------
00:01:42.743 !  (  0d 37m 30s , - 0d  0m -82620000s)
00:01:42.743   (1 row)
00:01:42.743   
00:01:42.743   SELECT set_sphere_output( 'HMS' );
00:01:42.744 ***************
00:01:42.744 *** 152,166 ****
00:01:42.744   (1 row)
00:01:42.744   
00:01:42.744   SELECT '( 1h 2m 30s , -1d 2m 30s)'::spoint;
00:01:42.744 !             spoint             
00:01:42.744 ! -------------------------------
00:01:42.744 !  (  1h  2m 30s , - 1d  2m 30s)
00:01:42.744   (1 row)
00:01:42.744   
00:01:42.744   SELECT '( 0h 2m 30s , -0d 2m 30s)'::spoint;
00:01:42.744 !             spoint             
00:01:42.744 ! -------------------------------
00:01:42.744 !  (  0h  2m 30s , - 0d  2m 30s)
00:01:42.744   (1 row)
00:01:42.745   
00:01:42.745   SELECT '( 0h 2m 30s , 90d 0m 0s)'::spoint;
00:01:42.745 --- 152,166 ----
00:01:42.745   (1 row)
00:01:42.745   
00:01:42.745   SELECT '( 1h 2m 30s , -1d 2m 30s)'::spoint;
00:01:42.745 !                spoint               
00:01:42.745 ! ------------------------------------
00:01:42.745 !  (  1h  2m 30s , - 0d  0m -956250s)
00:01:42.745   (1 row)
00:01:42.745   
00:01:42.745   SELECT '( 0h 2m 30s , -0d 2m 30s)'::spoint;
00:01:42.745 !               spoint               
00:01:42.745 ! -----------------------------------
00:01:42.745 !  (  0h  2m 30s , - 0d  0m -38250s)
00:01:42.745   (1 row)
00:01:42.746   
00:01:42.746   SELECT '( 0h 2m 30s , 90d 0m 0s)'::spoint;
00:01:42.746 ***************
00:01:42.746 *** 170,178 ****
00:01:42.746   (1 row)
00:01:42.746   
00:01:42.746   SELECT '( 0h 2m 30s ,-90d 0m 0s)'::spoint;
00:01:42.756 !             spoint            
00:01:42.756 ! ------------------------------
00:01:42.756 !  (  0h  2m 30s , -90d  0m 0s)
00:01:42.756   (1 row)
00:01:42.756   
00:01:42.756   SELECT set_sphere_output( 'RAD' );
00:01:42.756 --- 170,178 ----
00:01:42.756   (1 row)
00:01:42.757   
00:01:42.757   SELECT '( 0h 2m 30s ,-90d 0m 0s)'::spoint;
00:01:42.757 !                 spoint                
00:01:42.757 ! --------------------------------------
00:01:42.757 !  (  0h  2m 30s , - 0d  0m -82620000s)
00:01:42.757   (1 row)
00:01:42.757   
00:01:42.757   SELECT set_sphere_output( 'RAD' );
00:01:42.757 
00:01:42.761 ======================================================================
00:01:42.761 
00:01:42.761 *** /tmp/autopkgtest.vJaxRz/tree/expected/circle.out	2017-07-28 15:35:48.000000000 +0000
00:01:42.762 --- /tmp/autopkgtest.vJaxRz/tree/results/circle.out	2017-08-18 11:06:13.437261205 +0000
00:01:42.762 ***************
00:01:42.762 *** 215,223 ****
00:01:42.762   (1 row)
00:01:42.762   
00:01:42.762   SELECT scircle('(0d,-90d)'::spoint);
00:01:42.762 !                   scircle                   
00:01:42.762 ! --------------------------------------------
00:01:42.762 !  <(  0d  0m 0s , -90d  0m 0s) ,  0d  0m 0s>
00:01:42.763   (1 row)
00:01:42.763   
00:01:42.763   -- Operators
00:01:42.763 --- 215,223 ----
00:01:42.768   (1 row)
00:01:42.768   
00:01:42.768   SELECT scircle('(0d,-90d)'::spoint);
00:01:42.768 !                       scircle                       
00:01:42.768 ! ----------------------------------------------------
00:01:42.768 !  <(  0d  0m 0s , - 0d  0m -82620000s) ,  0d  0m 0s>
00:01:42.768   (1 row)
00:01:42.769   
00:01:42.769   -- Operators
00:01:42.769 
00:01:42.774 ======================================================================
00:01:42.775 
00:01:42.775 *** /tmp/autopkgtest.vJaxRz/tree/expected/gnomo.out	2017-07-28 15:35:48.000000000 +0000
00:01:42.775 --- /tmp/autopkgtest.vJaxRz/tree/results/gnomo.out	2017-08-18 11:06:14.141271403 +0000
00:01:42.775 ***************
00:01:42.775 *** 30,38 ****
00:01:42.775   (1 row)
00:01:42.775   
00:01:42.776   select gnomonic_proj(spoint '(1, -0.45)', spoint '(1, -0.45)');
00:01:42.776 !  gnomonic_proj 
00:01:42.776 ! ---------------
00:01:42.776 !  (0,0)
00:01:42.776   (1 row)
00:01:42.776   
00:01:42.776   select gnomonic_proj(spoint '(1, -0.445)', spoint '(1, -0.45)');
00:01:42.776 --- 30,38 ----
00:01:42.777   (1 row)
00:01:42.777   
00:01:42.777   select gnomonic_proj(spoint '(1, -0.45)', spoint '(1, -0.45)');
00:01:42.777 !      gnomonic_proj     
00:01:42.777 ! -----------------------
00:01:42.777 !  (0,6.54651790442e-18)
00:01:42.777   (1 row)
00:01:42.777   
00:01:42.777   select gnomonic_proj(spoint '(1, -0.445)', spoint '(1, -0.45)');
00:01:42.777 ***************
00:01:42.778 *** 84,92 ****
00:01:42.778   (1 row)
00:01:42.778   
00:01:42.778   select gnomonic_proj(spoint '(1, 0.05)', spoint '(1, 0.05)');
00:01:42.778 !  gnomonic_proj 
00:01:42.778 ! ---------------
00:01:42.778 !  (0,0)
00:01:42.778   (1 row)
00:01:42.778   
00:01:42.778   select gnomonic_proj(spoint '(1, 0.055)', spoint '(1, 0.05)');
00:01:42.778 --- 84,92 ----
00:01:42.778   (1 row)
00:01:42.779   
00:01:42.779   select gnomonic_proj(spoint '(1, 0.05)', spoint '(1, 0.05)');
00:01:42.779 !      gnomonic_proj     
00:01:42.779 ! -----------------------
00:01:42.779 !  (0,2.60434729872e-18)
00:01:42.779   (1 row)
00:01:42.779   
00:01:42.779   select gnomonic_proj(spoint '(1, 0.055)', spoint '(1, 0.05)');
00:01:42.779 ***************
00:01:42.779 *** 138,146 ****
00:01:42.779   (1 row)
00:01:42.779   
00:01:42.780   select gnomonic_proj(spoint '(1, 0.55)', spoint '(1, 0.55)');
00:01:42.780 !  gnomonic_proj 
00:01:42.780 ! ---------------
00:01:42.780 !  (0,0)
00:01:42.780   (1 row)
00:01:42.780   
00:01:42.780   select gnomonic_proj(spoint '(1, 0.555)', spoint '(1, 0.55)');
00:01:42.780 --- 138,146 ----
00:01:42.780   (1 row)
00:01:42.780   
00:01:42.780   select gnomonic_proj(spoint '(1, 0.55)', spoint '(1, 0.55)');
00:01:42.780 !      gnomonic_proj      
00:01:42.781 ! ------------------------
00:01:42.781 !  (0,-2.38158728306e-17)
00:01:42.781   (1 row)
00:01:42.781   
00:01:42.781   select gnomonic_proj(spoint '(1, 0.555)', spoint '(1, 0.55)');
00:01:42.781 ***************
00:01:42.781 *** 192,200 ****
00:01:42.781   (1 row)
00:01:42.781   
00:01:42.781   select gnomonic_proj(spoint '(3, -0.45)', spoint '(3, -0.45)');
00:01:42.781 !  gnomonic_proj 
00:01:42.781 ! ---------------
00:01:42.782 !  (0,0)
00:01:42.782   (1 row)
00:01:42.782   
00:01:42.782   select gnomonic_proj(spoint '(3, -0.445)', spoint '(3, -0.45)');
00:01:42.782 --- 192,200 ----
00:01:42.782   (1 row)
00:01:42.782   
00:01:42.782   select gnomonic_proj(spoint '(3, -0.45)', spoint '(3, -0.45)');
00:01:42.782 !      gnomonic_proj     
00:01:42.782 ! -----------------------
00:01:42.782 !  (0,6.54651790442e-18)
00:01:42.782   (1 row)
00:01:42.783   
00:01:42.783   select gnomonic_proj(spoint '(3, -0.445)', spoint '(3, -0.45)');
00:01:42.783 ***************
00:01:42.783 *** 246,254 ****
00:01:42.783   (1 row)
00:01:42.783   
00:01:42.783   select gnomonic_proj(spoint '(3, 0.05)', spoint '(3, 0.05)');
00:01:42.783 !  gnomonic_proj 
00:01:42.783 ! ---------------
00:01:42.783 !  (0,0)
00:01:42.783   (1 row)
00:01:42.783   
00:01:42.784   select gnomonic_proj(spoint '(3, 0.055)', spoint '(3, 0.05)');
00:01:42.784 --- 246,254 ----
00:01:42.784   (1 row)
00:01:42.784   
00:01:42.784   select gnomonic_proj(spoint '(3, 0.05)', spoint '(3, 0.05)');
00:01:42.784 !      gnomonic_proj     
00:01:42.784 ! -----------------------
00:01:42.790 !  (0,2.60434729872e-18)
00:01:42.797   (1 row)
00:01:42.797   
00:01:42.797   select gnomonic_proj(spoint '(3, 0.055)', spoint '(3, 0.05)');
00:01:42.797 ***************
00:01:42.797 *** 300,308 ****
00:01:42.798   (1 row)
00:01:42.798   
00:01:42.798   select gnomonic_proj(spoint '(3, 0.55)', spoint '(3, 0.55)');
00:01:42.798 !  gnomonic_proj 
00:01:42.798 ! ---------------
00:01:42.798 !  (0,0)
00:01:42.798   (1 row)
00:01:42.799   
00:01:42.799   select gnomonic_proj(spoint '(3, 0.555)', spoint '(3, 0.55)');
00:01:42.799 --- 300,308 ----
00:01:42.799   (1 row)
00:01:42.799   
00:01:42.799   select gnomonic_proj(spoint '(3, 0.55)', spoint '(3, 0.55)');
00:01:42.800 !      gnomonic_proj      
00:01:42.800 ! ------------------------
00:01:42.800 !  (0,-2.38158728306e-17)
00:01:42.800   (1 row)
00:01:42.800   
00:01:42.800   select gnomonic_proj(spoint '(3, 0.555)', spoint '(3, 0.55)');
00:01:42.801 ***************
00:01:42.801 *** 354,362 ****
00:01:42.801   (1 row)
00:01:42.801   
00:01:42.801   select gnomonic_proj(spoint '(5, -0.45)', spoint '(5, -0.45)');
00:01:42.802 !  gnomonic_proj 
00:01:42.802 ! ---------------
00:01:42.802 !  (0,0)
00:01:42.802   (1 row)
00:01:42.802   
00:01:42.802   select gnomonic_proj(spoint '(5, -0.445)', spoint '(5, -0.45)');
00:01:42.802 --- 354,362 ----
00:01:42.803   (1 row)
00:01:42.803   
00:01:42.803   select gnomonic_proj(spoint '(5, -0.45)', spoint '(5, -0.45)');
00:01:42.803 !      gnomonic_proj     
00:01:42.803 ! -----------------------
00:01:42.803 !  (0,6.54651790442e-18)
00:01:42.803   (1 row)
00:01:42.803   
00:01:42.803   select gnomonic_proj(spoint '(5, -0.445)', spoint '(5, -0.45)');
00:01:42.804 ***************
00:01:42.804 *** 408,416 ****
00:01:42.804   (1 row)
00:01:42.804   
00:01:42.804   select gnomonic_proj(spoint '(5, 0.05)', spoint '(5, 0.05)');
00:01:42.804 !  gnomonic_proj 
00:01:42.804 ! ---------------
00:01:42.804 !  (0,0)
00:01:42.804   (1 row)
00:01:42.804   
00:01:42.804   select gnomonic_proj(spoint '(5, 0.055)', spoint '(5, 0.05)');
00:01:42.804 --- 408,416 ----
00:01:42.805   (1 row)
00:01:42.805   
00:01:42.805   select gnomonic_proj(spoint '(5, 0.05)', spoint '(5, 0.05)');
00:01:42.805 !      gnomonic_proj     
00:01:42.805 ! -----------------------
00:01:42.805 !  (0,2.60434729872e-18)
00:01:42.805   (1 row)
00:01:42.805   
00:01:42.805   select gnomonic_proj(spoint '(5, 0.055)', spoint '(5, 0.05)');
00:01:42.805 ***************
00:01:42.805 *** 462,470 ****
00:01:42.806   (1 row)
00:01:42.806   
00:01:42.806   select gnomonic_proj(spoint '(5, 0.55)', spoint '(5, 0.55)');
00:01:42.806 !  gnomonic_proj 
00:01:42.806 ! ---------------
00:01:42.806 !  (0,0)
00:01:42.806   (1 row)
00:01:42.806   
00:01:42.806   select gnomonic_proj(spoint '(5, 0.555)', spoint '(5, 0.55)');
00:01:42.806 --- 462,470 ----
00:01:42.806   (1 row)
00:01:42.806   
00:01:42.806   select gnomonic_proj(spoint '(5, 0.55)', spoint '(5, 0.55)');
00:01:42.807 !      gnomonic_proj      
00:01:42.807 ! ------------------------
00:01:42.807 !  (0,-2.38158728306e-17)
00:01:42.808   (1 row)
00:01:42.808   
00:01:42.808   select gnomonic_proj(spoint '(5, 0.555)', spoint '(5, 0.55)');
00:01:42.808 

build issue with PostgreSQL 12

System is Ubuntu Linux, 18.04, both postgresql and pgsphere built from source
pgsphere is unzip'd to postgresql-12.0/contrib/pgsphere-master

"make" results in:

rm -f pg_sphere.so libpg_sphere.a libpg_sphere.pc
rm -f pg_sphere--1.0.sql
rm -f sscan.o sparse.o sbuffer.o vector3d.o point.o euler.o circle.o line.o ellipse.o polygon.o path.o box.o output.o gq_cache.o gist.o key.o gnomo.o sscan.bc sparse.bc sbuffer.bc vector3d.bc point.bc euler.bc circle.bc line.bc ellipse.bc polygon.bc path.bc box.bc output.bc gq_cache.bc gist.bc key.bc gnomo.bc
rm -rf pg_sphere--1.0.sql pgs_types.sql pgs_point.sql pgs_euler.sql pgs_circle.sql pgs_line.sql pgs_ellipse.sql pgs_polygon.sql pgs_path.sql pgs_box.sql pgs_contains_ops.sql pgs_contains_ops_compat.sql pgs_gist.sql gnomo.sql
rm -rf results/ regression.diffs regression.out tmp_check/ tmp_check_iso/ log/ output_iso/
make -C ../../src/backend generated-headers
make[1]: Entering directory '/scratch0/local/src/postgresql-12.0/src/backend'
make -C catalog distprep generated-header-symlinks
make[2]: Entering directory '/scratch0/local/src/postgresql-12.0/src/backend/catalog'
make[2]: Nothing to be done for 'distprep'.
make[2]: Nothing to be done for 'generated-header-symlinks'.
make[2]: Leaving directory '/scratch0/local/src/postgresql-12.0/src/backend/catalog'
make -C utils distprep generated-header-symlinks
make[2]: Entering directory '/scratch0/local/src/postgresql-12.0/src/backend/utils'
make[2]: Nothing to be done for 'distprep'.
make[2]: Nothing to be done for 'generated-header-symlinks'.
make[2]: Leaving directory '/scratch0/local/src/postgresql-12.0/src/backend/utils'
make[1]: Leaving directory '/scratch0/local/src/postgresql-12.0/src/backend'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o sscan.o sscan.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o sparse.o sparse.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o sbuffer.o sbuffer.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o vector3d.o vector3d.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o point.o point.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o euler.o euler.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o circle.o circle.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o line.o line.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o ellipse.o ellipse.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o polygon.o polygon.c
polygon.c: In function ‘spherepoly_in’:
polygon.c:827:3: error: ISO C90 forbids variable length array ‘arr’ [-Werror=vla]
SPoint arr[nelem];
^~~~~~
polygon.c: In function ‘spherepoly_area’:
polygon.c:895:2: error: ISO C90 forbids variable length array ‘s’ [-Werror=vla]
SPoint s[poly->npts + 2];
^~~~~~
cc1: some warnings being treated as errors
: recipe for target 'polygon.o' failed
make: *** [polygon.o] Error 1

I am not a C programmer, and I was unable to successfully modify the pgsphere code, nor was I successful in using c99 rather then gcc as the compiler (a suggestion found while searching the above errors). But I was able to get this to build making the following change in postgresql-12.0/src/Makefile.global:

--- Makefile.global.original 2019-10-28 15:44:22.976557899 -0700
+++ Makefile.global 2019-10-28 16:46:10.969861000 -0700
@@ -257,7 +257,7 @@
GCC = yes
SUN_STUDIO_CC = no
CXX = g++
-CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2
+CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2
CFLAGS_VECTOR = -funroll-loops -ftree-vectorize
CFLAGS_SSE42 = -msse4.2
CFLAGS_ARMV8_CRC32C =

Uninstalling old pgsphere to install new pgsphere

I recently upgraded our PostgreSQL database from 9.2 to 10.1, and I experienced various issues as a result of having installed the old (pre-extension) version of pgsphere. CREATE EXTENSION pg_sphere; failed because the datatypes and functions already existed. The only solution I could find was to DROP all the pgsphere datatypes/functions/etc. with CASCADE first, then pg_upgrade, and then CREATE EXTENSION pg_sphere; would work.

I don't know if that's an issue for anyone else. If it is, maybe this SQL file will save someone some time:

pgsphere_uninstall.txt

ISO C90 forbids variable length array ‘arr’ [-Werror=vla]

Build fails on Ubuntu 20.04.2 LTS running Ubuntu 13.2-1.pgdg20.04+1:

polygon.c: In function ‘spherepoly_in’:
polygon.c:827:3: error: ISO C90 forbids variable length array ‘arr’ [-Werror=vla]
  827 |   SPoint  arr[nelem];
      |   ^~~~~~
polygon.c: In function ‘spherepoly_area’:
polygon.c:895:2: error: ISO C90 forbids variable length array ‘s’ [-Werror=vla]
  895 |  SPoint  s[poly->npts + 2];
      |  ^~~~~~
cc1: some warnings being treated as errors
make: *** [<builtin>: polygon.o] Error 1

precision issue with very small spoly

I am trying to insert very small polygons. I can insert a polygon with micro-radians (1e-6) coordinate values:

select '{(0.0,-0.000001),(6.283184,0.0),(0.0,0.000001),(0.000001,0.0)}'::spoly;
                         spoly                         
-------------------------------------------------------
 {(0 , -1e-06),(6.283184 , 0),(0 , 1e-06),(1e-06 , 0)}

When I try nano-radians (1e-9) the parser seems to consider some points as equal:

select '{(0.0,-0.000000001),(6.283185306,0.0),(0.0,0.000000001),(0.000000001,0.0)}'::spoly;
ERROR:  spherepoly_from_array: more than two points needed

Are the parser/internals using single-precision/float instead of double?

strans is broken

I tried the following query from documentation examples on PostgreSQL server 9.6.15, 10.10 and 11.5 and PostgreSQL client 10.10:

SELECT theta( strans '20d,30d,40d,XZY' ) * 180 / pi() AS theta;

For each case I've obtained wrong result, moreover two consecutive executions sometimes give different results, for instance 2.66762880858253e-308 and 2.66762880856011e-308. I've run tests on 9.6.15 as described in readme, they've passed.

Not possible anymore to index on spoint with NULL

I used the ZIP file generated from the last commit (1a84dec, labeled "Compatibility with PostgreSQL 11") with a PostgreSQL-10 database. I have created a table with the Hipparcos main table containing few rows with ra and dec set to NULL.

With a previous version of PgSphere, creating an index on spoint(radians(ra), radians(dec)) worked very well with the following SQL statement:

CREATE INDEX hip_icrs_idx ON hipparcos                                           
       USING GIST (spoint(radians(ra), radians(dec)));

But with this last commit, it always fails.

I discovered that it was due to NULL values. spoint(radians(NULL), radians(NULL))) works well though ; it returns NULL. So, it seems the issue lies in the function used by the GiST index....probably some functions updated in the last commit, but I could not tell which one (I am no expect in GiST).

Maybe it is normal...after all, I used a version targeting PostgreSQL-11, not -10. But I expected it would be backward compatible.

So, for the moment I continue to use PgSphere with the previous commit (ac45271).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.