From daa9478bcd1988d5934541b7e09b37a909d23b92 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Mon, 22 Apr 2024 09:22:05 +0300 Subject: [PATCH 01/21] Alter spoint op family to add missed operator 17 (<->) (#121) The upgrade script misses the altering of spoint operator family to add operator 17. It is required for k-NN search. Change the version to 1.5.1. --- Makefile | 6 +++++- Makefile.common.mk | 2 +- expected/version.out | 2 +- pg_sphere.control | 2 +- upgrade_scripts/pg_sphere--1.5.0--1.5.1.sql.in | 11 +++++++++++ 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 upgrade_scripts/pg_sphere--1.5.0--1.5.1.sql.in diff --git a/Makefile b/Makefile index 81dc57c..78f2dc5 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,8 @@ DATA_built = $(RELEASE_SQL) \ pg_sphere--1.3.1--1.4.0.sql \ pg_sphere--1.4.0--1.4.1.sql \ pg_sphere--1.4.1--1.4.2.sql \ - pg_sphere--1.4.2--1.5.0.sql + pg_sphere--1.4.2--1.5.0.sql \ + pg_sphere--1.5.0--1.5.1.sql DOCS = README.pg_sphere COPYRIGHT.pg_sphere TESTS = version tables points euler circle line ellipse poly path box \ @@ -214,6 +215,9 @@ pg_sphere--1.4.0--1.4.1.sql pg_sphere--1.4.1--1.4.2.sql: pg_sphere--1.4.2--1.5.0.sql: cat upgrade_scripts/$@.in $^ > $@ +pg_sphere--1.5.0--1.5.1.sql: + cat upgrade_scripts/$@.in $^ > $@ + # end of local stuff src/sscan.o : src/sparse.c diff --git a/Makefile.common.mk b/Makefile.common.mk index 7764d84..be82047 100644 --- a/Makefile.common.mk +++ b/Makefile.common.mk @@ -5,4 +5,4 @@ #---------------------------------------------------------------------------- EXTENSION := pg_sphere -PGSPHERE_VERSION := 1.5.0 +PGSPHERE_VERSION := 1.5.1 diff --git a/expected/version.out b/expected/version.out index 1d82d75..ffad8f5 100644 --- a/expected/version.out +++ b/expected/version.out @@ -2,6 +2,6 @@ SELECT pg_sphere_version(); pg_sphere_version ------------------- - 1.5.0 + 1.5.1 (1 row) diff --git a/pg_sphere.control b/pg_sphere.control index 4ecf4cd..1e73251 100644 --- a/pg_sphere.control +++ b/pg_sphere.control @@ -1,5 +1,5 @@ # pg_sphere extension comment = 'spherical objects with useful functions, operators and index support' -default_version = '1.5.0' +default_version = '1.5.1' module_pathname = '$libdir/pg_sphere' relocatable = true diff --git a/upgrade_scripts/pg_sphere--1.5.0--1.5.1.sql.in b/upgrade_scripts/pg_sphere--1.5.0--1.5.1.sql.in new file mode 100644 index 0000000..20c7cf6 --- /dev/null +++ b/upgrade_scripts/pg_sphere--1.5.0--1.5.1.sql.in @@ -0,0 +1,11 @@ +-- Upgrade: 1.5.0 -> 1.5.1 + +DO $$ +BEGIN + ALTER OPERATOR FAMILY spoint USING gist ADD + OPERATOR 17 <-> (spoint, spoint) FOR ORDER BY float_ops; +EXCEPTION + WHEN duplicate_object THEN NULL; + WHEN OTHERS THEN RAISE; +END; +$$; From 59ae17964ac812515b47606eef8f69edf0f15684 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Mon, 20 May 2024 16:41:21 +0300 Subject: [PATCH 02/21] Re-generate parser source files --- src/sparse.c | 180 +++++++++++++++++++++++++-------------------------- src/sparse.h | 10 +-- src/sscan.c | 60 ++++++++--------- 3 files changed, 125 insertions(+), 125 deletions(-) diff --git a/src/sparse.c b/src/sparse.c index f220086..9eb7d57 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -74,7 +74,7 @@ #define yychar sphere_yychar /* First part of user prologue. */ -#line 1 "sparse.y" +#line 1 "src/sparse.y" #include #include @@ -110,7 +110,7 @@ static double human2dec(double d, double m, double s) } -#line 114 "sparse.c" +#line 114 "src/sparse.c" # ifndef YY_NULLPTR # if defined __cplusplus @@ -134,8 +134,8 @@ static double human2dec(double d, double m, double s) /* Use api.header.include to #include this header instead of duplicating it here. */ -#ifndef YY_SPHERE_YY_SPARSE_H_INCLUDED -# define YY_SPHERE_YY_SPARSE_H_INCLUDED +#ifndef YY_SPHERE_YY_SRC_SPARSE_H_INCLUDED +# define YY_SPHERE_YY_SRC_SPARSE_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -187,13 +187,13 @@ extern int sphere_yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 41 "sparse.y" +#line 41 "src/sparse.y" int i; double d; char c[3]; -#line 197 "sparse.c" +#line 197 "src/sparse.c" }; typedef union YYSTYPE YYSTYPE; @@ -206,7 +206,7 @@ extern YYSTYPE sphere_yylval; int sphere_yyparse (void); -#endif /* !YY_SPHERE_YY_SPARSE_H_INCLUDED */ +#endif /* !YY_SPHERE_YY_SRC_SPARSE_H_INCLUDED */ @@ -1349,265 +1349,265 @@ yyparse (void) switch (yyn) { case 4: -#line 70 "sparse.y" +#line 70 "src/sparse.y" { set_spheretype( STYPE_POINT ); } -#line 1355 "sparse.c" +#line 1355 "src/sparse.c" break; case 5: -#line 71 "sparse.y" +#line 71 "src/sparse.y" { set_spheretype( STYPE_CIRCLE ); } -#line 1361 "sparse.c" +#line 1361 "src/sparse.c" break; case 6: -#line 72 "sparse.y" +#line 72 "src/sparse.y" { set_spheretype( STYPE_LINE ); } -#line 1367 "sparse.c" +#line 1367 "src/sparse.c" break; case 7: -#line 73 "sparse.y" +#line 73 "src/sparse.y" { set_spheretype( STYPE_EULER ); } -#line 1373 "sparse.c" +#line 1373 "src/sparse.c" break; case 8: -#line 74 "sparse.y" +#line 74 "src/sparse.y" { set_spheretype( STYPE_PATH ); } -#line 1379 "sparse.c" +#line 1379 "src/sparse.c" break; case 9: -#line 75 "sparse.y" +#line 75 "src/sparse.y" { set_spheretype( STYPE_ELLIPSE ); } -#line 1385 "sparse.c" +#line 1385 "src/sparse.c" break; case 10: -#line 76 "sparse.y" +#line 76 "src/sparse.y" { set_spheretype( STYPE_BOX ); } -#line 1391 "sparse.c" +#line 1391 "src/sparse.c" break; case 11: -#line 81 "sparse.y" +#line 81 "src/sparse.y" { (yyval.d) = (yyvsp[0].d); } -#line 1397 "sparse.c" +#line 1397 "src/sparse.c" break; case 12: -#line 82 "sparse.y" +#line 82 "src/sparse.y" { (yyval.d) = (yyvsp[0].i); } -#line 1403 "sparse.c" +#line 1403 "src/sparse.c" break; case 13: -#line 87 "sparse.y" +#line 87 "src/sparse.y" { (yyval.i) = set_angle(0, (yyvsp[0].d) ); } -#line 1409 "sparse.c" +#line 1409 "src/sparse.c" break; case 14: -#line 88 "sparse.y" +#line 88 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].d), 0, 0) ); } -#line 1415 "sparse.c" +#line 1415 "src/sparse.c" break; case 15: -#line 89 "sparse.y" +#line 89 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].i), 0, 0) ); } -#line 1421 "sparse.c" +#line 1421 "src/sparse.c" break; case 16: -#line 90 "sparse.y" +#line 90 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-2].i), (yyvsp[0].d), 0) ); } -#line 1427 "sparse.c" +#line 1427 "src/sparse.c" break; case 17: -#line 91 "sparse.y" +#line 91 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].d), 0) ); } -#line 1433 "sparse.c" +#line 1433 "src/sparse.c" break; case 18: -#line 92 "sparse.y" +#line 92 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].i), 0) ); } -#line 1439 "sparse.c" +#line 1439 "src/sparse.c" break; case 19: -#line 93 "sparse.y" +#line 93 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d)) ); } -#line 1445 "sparse.c" +#line 1445 "src/sparse.c" break; case 20: -#line 94 "sparse.y" +#line 94 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d)) ); } -#line 1451 "sparse.c" +#line 1451 "src/sparse.c" break; case 21: -#line 99 "sparse.y" +#line 99 "src/sparse.y" { (yyval.i) = set_angle(0, (yyvsp[0].d)); } -#line 1457 "sparse.c" +#line 1457 "src/sparse.c" break; case 22: -#line 100 "sparse.y" +#line 100 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].d), 0, 0)); } -#line 1463 "sparse.c" +#line 1463 "src/sparse.c" break; case 23: -#line 101 "sparse.y" +#line 101 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].i), 0, 0)); } -#line 1469 "sparse.c" +#line 1469 "src/sparse.c" break; case 24: -#line 102 "sparse.y" +#line 102 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-2].i), (yyvsp[0].d), 0)); } -#line 1475 "sparse.c" +#line 1475 "src/sparse.c" break; case 25: -#line 103 "sparse.y" +#line 103 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].d), 0)); } -#line 1481 "sparse.c" +#line 1481 "src/sparse.c" break; case 26: -#line 104 "sparse.y" +#line 104 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].i), 0)); } -#line 1487 "sparse.c" +#line 1487 "src/sparse.c" break; case 27: -#line 105 "sparse.y" +#line 105 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d))); } -#line 1493 "sparse.c" +#line 1493 "src/sparse.c" break; case 28: -#line 106 "sparse.y" +#line 106 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d))); } -#line 1499 "sparse.c" +#line 1499 "src/sparse.c" break; case 29: -#line 107 "sparse.y" +#line 107 "src/sparse.y" { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-2].i), (yyvsp[0].d), 0)); } -#line 1505 "sparse.c" +#line 1505 "src/sparse.c" break; case 30: -#line 108 "sparse.y" +#line 108 "src/sparse.y" { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d))); } -#line 1511 "sparse.c" +#line 1511 "src/sparse.c" break; case 31: -#line 109 "sparse.y" +#line 109 "src/sparse.y" { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d))); } -#line 1517 "sparse.c" +#line 1517 "src/sparse.c" break; case 32: -#line 114 "sparse.y" +#line 114 "src/sparse.y" { (yyval.i) = set_angle_sign((yyvsp[0].i), 1); } -#line 1523 "sparse.c" +#line 1523 "src/sparse.c" break; case 33: -#line 115 "sparse.y" +#line 115 "src/sparse.y" { (yyval.i) = set_angle_sign((yyvsp[0].i), (yyvsp[-1].i)); } -#line 1529 "sparse.c" +#line 1529 "src/sparse.c" break; case 34: -#line 120 "sparse.y" +#line 120 "src/sparse.y" { (yyval.i) = set_angle_sign((yyvsp[0].i), 1); } -#line 1535 "sparse.c" +#line 1535 "src/sparse.c" break; case 35: -#line 121 "sparse.y" +#line 121 "src/sparse.y" { (yyval.i) = set_angle_sign((yyvsp[0].i), (yyvsp[-1].i)); } -#line 1541 "sparse.c" +#line 1541 "src/sparse.c" break; case 36: -#line 128 "sparse.y" +#line 128 "src/sparse.y" { (yyval.i) = set_point((yyvsp[-3].i), (yyvsp[-1].i)); } -#line 1549 "sparse.c" +#line 1549 "src/sparse.c" break; case 37: -#line 136 "sparse.y" +#line 136 "src/sparse.y" { set_circle((yyvsp[-3].i), (yyvsp[-1].i)); } -#line 1557 "sparse.c" +#line 1557 "src/sparse.c" break; case 38: -#line 144 "sparse.y" +#line 144 "src/sparse.y" { set_euler((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].i), "ZXZ"); } -#line 1565 "sparse.c" +#line 1565 "src/sparse.c" break; case 39: -#line 148 "sparse.y" +#line 148 "src/sparse.y" { set_euler((yyvsp[-6].i), (yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].c)); } -#line 1573 "sparse.c" +#line 1573 "src/sparse.c" break; case 40: -#line 156 "sparse.y" +#line 156 "src/sparse.y" { set_line ((yyvsp[0].i)); } -#line 1581 "sparse.c" +#line 1581 "src/sparse.c" break; case 43: -#line 168 "sparse.y" +#line 168 "src/sparse.y" { } -#line 1587 "sparse.c" +#line 1587 "src/sparse.c" break; case 44: -#line 174 "sparse.y" +#line 174 "src/sparse.y" { set_ellipse((yyvsp[-8].i), (yyvsp[-6].i), (yyvsp[-3].i), (yyvsp[-1].i)); } -#line 1595 "sparse.c" +#line 1595 "src/sparse.c" break; case 45: -#line 181 "sparse.y" +#line 181 "src/sparse.y" { } -#line 1601 "sparse.c" +#line 1601 "src/sparse.c" break; case 46: -#line 182 "sparse.y" +#line 182 "src/sparse.y" { } -#line 1607 "sparse.c" +#line 1607 "src/sparse.c" break; -#line 1611 "sparse.c" +#line 1611 "src/sparse.c" default: break; } diff --git a/src/sparse.h b/src/sparse.h index 032b5fd..e6a1000 100644 --- a/src/sparse.h +++ b/src/sparse.h @@ -34,8 +34,8 @@ /* Undocumented macros, especially those whose name start with YY_, are private implementation details. Do not rely on them. */ -#ifndef YY_SPHERE_YY_SPARSE_H_INCLUDED -# define YY_SPHERE_YY_SPARSE_H_INCLUDED +#ifndef YY_SPHERE_YY_SRC_SPARSE_H_INCLUDED +# define YY_SPHERE_YY_SRC_SPARSE_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -87,13 +87,13 @@ extern int sphere_yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 41 "sparse.y" +#line 41 "src/sparse.y" int i; double d; char c[3]; -#line 97 "sparse.h" +#line 97 "src/sparse.h" }; typedef union YYSTYPE YYSTYPE; @@ -106,4 +106,4 @@ extern YYSTYPE sphere_yylval; int sphere_yyparse (void); -#endif /* !YY_SPHERE_YY_SPARSE_H_INCLUDED */ +#endif /* !YY_SPHERE_YY_SRC_SPARSE_H_INCLUDED */ diff --git a/src/sscan.c b/src/sscan.c index 3d904c6..0df711e 100644 --- a/src/sscan.c +++ b/src/sscan.c @@ -1,6 +1,6 @@ -#line 2 "sscan.c" +#line 2 "src/sscan.c" -#line 4 "sscan.c" +#line 4 "src/sscan.c" #define YY_INT_ALIGNED short int @@ -722,8 +722,8 @@ int yy_flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "sscan.l" -#line 2 "sscan.l" +#line 1 "src/sscan.l" +#line 2 "src/sscan.l" #include #include "string.h" #include "sparse.h" @@ -745,8 +745,8 @@ void sphere_flush_scanner_buffer(void) { YY_FLUSH_BUFFER; } -#line 749 "sscan.c" -#line 750 "sscan.c" +#line 749 "src/sscan.c" +#line 750 "src/sscan.c" #define INITIAL 0 @@ -961,9 +961,9 @@ YY_DECL } { -#line 35 "sscan.l" +#line 35 "src/sscan.l" -#line 967 "sscan.c" +#line 967 "src/sscan.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1018,106 +1018,106 @@ YY_DECL case 1: YY_RULE_SETUP -#line 36 "sscan.l" +#line 36 "src/sscan.l" sphere_yylval.i = (strcmp("-", yytext)) ? (1) : (-1); return SIGN; YY_BREAK case 2: YY_RULE_SETUP -#line 37 "sscan.l" +#line 37 "src/sscan.l" sphere_yylval.i = atoi(yytext); return INT; YY_BREAK case 3: YY_RULE_SETUP -#line 38 "sscan.l" +#line 38 "src/sscan.l" sphere_yylval.d = atof(yytext); return FLOAT; YY_BREAK case 4: YY_RULE_SETUP -#line 39 "sscan.l" +#line 39 "src/sscan.l" memcpy(&sphere_yylval.c[0], yytext, 3); return EULERAXIS; YY_BREAK case 5: YY_RULE_SETUP -#line 40 "sscan.l" +#line 40 "src/sscan.l" return HOUR; YY_BREAK case 6: YY_RULE_SETUP -#line 41 "sscan.l" +#line 41 "src/sscan.l" return DEG; YY_BREAK case 7: YY_RULE_SETUP -#line 42 "sscan.l" +#line 42 "src/sscan.l" return MIN; YY_BREAK case 8: YY_RULE_SETUP -#line 43 "sscan.l" +#line 43 "src/sscan.l" return MIN; YY_BREAK case 9: YY_RULE_SETUP -#line 44 "sscan.l" +#line 44 "src/sscan.l" return SEC; YY_BREAK case 10: YY_RULE_SETUP -#line 45 "sscan.l" +#line 45 "src/sscan.l" return SEC; YY_BREAK case 11: YY_RULE_SETUP -#line 46 "sscan.l" +#line 46 "src/sscan.l" return COMMA; YY_BREAK case 12: YY_RULE_SETUP -#line 47 "sscan.l" +#line 47 "src/sscan.l" return OPENCIRC; YY_BREAK case 13: YY_RULE_SETUP -#line 48 "sscan.l" +#line 48 "src/sscan.l" return CLOSECIRC; YY_BREAK case 14: YY_RULE_SETUP -#line 49 "sscan.l" +#line 49 "src/sscan.l" return OPENPOINT; YY_BREAK case 15: YY_RULE_SETUP -#line 50 "sscan.l" +#line 50 "src/sscan.l" return CLOSEPOINT; YY_BREAK case 16: YY_RULE_SETUP -#line 51 "sscan.l" +#line 51 "src/sscan.l" return OPENARR; YY_BREAK case 17: YY_RULE_SETUP -#line 52 "sscan.l" +#line 52 "src/sscan.l" return CLOSEARR; YY_BREAK case 18: /* rule 18 can match eol */ YY_RULE_SETUP -#line 53 "sscan.l" +#line 53 "src/sscan.l" /* discard spaces */ YY_BREAK case 19: YY_RULE_SETUP -#line 54 "sscan.l" +#line 54 "src/sscan.l" /* alert parser of the garbage */ YY_BREAK case 20: YY_RULE_SETUP -#line 55 "sscan.l" +#line 55 "src/sscan.l" ECHO; YY_BREAK -#line 1121 "sscan.c" +#line 1121 "src/sscan.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2086,6 +2086,6 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 55 "sscan.l" +#line 55 "src/sscan.l" From ac1d4ffa6339a79b46dba873f7d1c9d90e101b17 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Mon, 20 May 2024 16:50:32 +0300 Subject: [PATCH 03/21] Fix build under mingw64 Add TOK_ prefix to INT, FLOAT, SIGN token names to distinguist these names from macro directives under mingw64. --- src/sparse.c | 105 ++++++++++++++++++++++++++------------------------- src/sparse.h | 12 +++--- src/sparse.y | 48 +++++++++++------------ src/sscan.c | 6 +-- src/sscan.l | 6 +-- 5 files changed, 89 insertions(+), 88 deletions(-) diff --git a/src/sparse.c b/src/sparse.c index 9eb7d57..16a65d1 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -160,9 +160,9 @@ extern int sphere_yydebug; CLOSEPOINT = 266, OPENARR = 267, CLOSEARR = 268, - SIGN = 269, - INT = 270, - FLOAT = 271, + TOK_SIGN = 269, + TOK_INT = 270, + TOK_FLOAT = 271, EULERAXIS = 272 }; #endif @@ -178,9 +178,9 @@ extern int sphere_yydebug; #define CLOSEPOINT 266 #define OPENARR 267 #define CLOSEARR 268 -#define SIGN 269 -#define INT 270 -#define FLOAT 271 +#define TOK_SIGN 269 +#define TOK_INT 270 +#define TOK_FLOAT 271 #define EULERAXIS 272 /* Value type. */ @@ -515,10 +515,11 @@ static const char *const yytname[] = { "$end", "error", "$undefined", "HOUR", "DEG", "MIN", "SEC", "COMMA", "OPENCIRC", "CLOSECIRC", "OPENPOINT", "CLOSEPOINT", "OPENARR", - "CLOSEARR", "SIGN", "INT", "FLOAT", "EULERAXIS", "$accept", "commands", - "command", "number", "angle_lat_us", "angle_long_us", "angle_long", - "angle_lat", "spherepoint", "spherecircle", "eulertrans", "sphereline", - "spherepointlist", "spherepath", "sphereellipse", "spherebox", YY_NULLPTR + "CLOSEARR", "TOK_SIGN", "TOK_INT", "TOK_FLOAT", "EULERAXIS", "$accept", + "commands", "command", "number", "angle_lat_us", "angle_long_us", + "angle_long", "angle_lat", "spherepoint", "spherecircle", "eulertrans", + "sphereline", "spherepointlist", "spherepath", "sphereellipse", + "spherebox", YY_NULLPTR }; #endif @@ -1351,193 +1352,193 @@ yyparse (void) case 4: #line 70 "src/sparse.y" { set_spheretype( STYPE_POINT ); } -#line 1355 "src/sparse.c" +#line 1356 "src/sparse.c" break; case 5: #line 71 "src/sparse.y" { set_spheretype( STYPE_CIRCLE ); } -#line 1361 "src/sparse.c" +#line 1362 "src/sparse.c" break; case 6: #line 72 "src/sparse.y" { set_spheretype( STYPE_LINE ); } -#line 1367 "src/sparse.c" +#line 1368 "src/sparse.c" break; case 7: #line 73 "src/sparse.y" { set_spheretype( STYPE_EULER ); } -#line 1373 "src/sparse.c" +#line 1374 "src/sparse.c" break; case 8: #line 74 "src/sparse.y" { set_spheretype( STYPE_PATH ); } -#line 1379 "src/sparse.c" +#line 1380 "src/sparse.c" break; case 9: #line 75 "src/sparse.y" { set_spheretype( STYPE_ELLIPSE ); } -#line 1385 "src/sparse.c" +#line 1386 "src/sparse.c" break; case 10: #line 76 "src/sparse.y" { set_spheretype( STYPE_BOX ); } -#line 1391 "src/sparse.c" +#line 1392 "src/sparse.c" break; case 11: #line 81 "src/sparse.y" { (yyval.d) = (yyvsp[0].d); } -#line 1397 "src/sparse.c" +#line 1398 "src/sparse.c" break; case 12: #line 82 "src/sparse.y" { (yyval.d) = (yyvsp[0].i); } -#line 1403 "src/sparse.c" +#line 1404 "src/sparse.c" break; case 13: #line 87 "src/sparse.y" { (yyval.i) = set_angle(0, (yyvsp[0].d) ); } -#line 1409 "src/sparse.c" +#line 1410 "src/sparse.c" break; case 14: #line 88 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].d), 0, 0) ); } -#line 1415 "src/sparse.c" +#line 1416 "src/sparse.c" break; case 15: #line 89 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].i), 0, 0) ); } -#line 1421 "src/sparse.c" +#line 1422 "src/sparse.c" break; case 16: #line 90 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-2].i), (yyvsp[0].d), 0) ); } -#line 1427 "src/sparse.c" +#line 1428 "src/sparse.c" break; case 17: #line 91 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].d), 0) ); } -#line 1433 "src/sparse.c" +#line 1434 "src/sparse.c" break; case 18: #line 92 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].i), 0) ); } -#line 1439 "src/sparse.c" +#line 1440 "src/sparse.c" break; case 19: #line 93 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d)) ); } -#line 1445 "src/sparse.c" +#line 1446 "src/sparse.c" break; case 20: #line 94 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d)) ); } -#line 1451 "src/sparse.c" +#line 1452 "src/sparse.c" break; case 21: #line 99 "src/sparse.y" { (yyval.i) = set_angle(0, (yyvsp[0].d)); } -#line 1457 "src/sparse.c" +#line 1458 "src/sparse.c" break; case 22: #line 100 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].d), 0, 0)); } -#line 1463 "src/sparse.c" +#line 1464 "src/sparse.c" break; case 23: #line 101 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].i), 0, 0)); } -#line 1469 "src/sparse.c" +#line 1470 "src/sparse.c" break; case 24: #line 102 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-2].i), (yyvsp[0].d), 0)); } -#line 1475 "src/sparse.c" +#line 1476 "src/sparse.c" break; case 25: #line 103 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].d), 0)); } -#line 1481 "src/sparse.c" +#line 1482 "src/sparse.c" break; case 26: #line 104 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].i), 0)); } -#line 1487 "src/sparse.c" +#line 1488 "src/sparse.c" break; case 27: #line 105 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d))); } -#line 1493 "src/sparse.c" +#line 1494 "src/sparse.c" break; case 28: #line 106 "src/sparse.y" { (yyval.i) = set_angle(1, human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d))); } -#line 1499 "src/sparse.c" +#line 1500 "src/sparse.c" break; case 29: #line 107 "src/sparse.y" { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-2].i), (yyvsp[0].d), 0)); } -#line 1505 "src/sparse.c" +#line 1506 "src/sparse.c" break; case 30: #line 108 "src/sparse.y" { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d))); } -#line 1511 "src/sparse.c" +#line 1512 "src/sparse.c" break; case 31: #line 109 "src/sparse.y" { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d))); } -#line 1517 "src/sparse.c" +#line 1518 "src/sparse.c" break; case 32: #line 114 "src/sparse.y" { (yyval.i) = set_angle_sign((yyvsp[0].i), 1); } -#line 1523 "src/sparse.c" +#line 1524 "src/sparse.c" break; case 33: #line 115 "src/sparse.y" { (yyval.i) = set_angle_sign((yyvsp[0].i), (yyvsp[-1].i)); } -#line 1529 "src/sparse.c" +#line 1530 "src/sparse.c" break; case 34: #line 120 "src/sparse.y" { (yyval.i) = set_angle_sign((yyvsp[0].i), 1); } -#line 1535 "src/sparse.c" +#line 1536 "src/sparse.c" break; case 35: #line 121 "src/sparse.y" { (yyval.i) = set_angle_sign((yyvsp[0].i), (yyvsp[-1].i)); } -#line 1541 "src/sparse.c" +#line 1542 "src/sparse.c" break; case 36: @@ -1545,7 +1546,7 @@ yyparse (void) { (yyval.i) = set_point((yyvsp[-3].i), (yyvsp[-1].i)); } -#line 1549 "src/sparse.c" +#line 1550 "src/sparse.c" break; case 37: @@ -1553,7 +1554,7 @@ yyparse (void) { set_circle((yyvsp[-3].i), (yyvsp[-1].i)); } -#line 1557 "src/sparse.c" +#line 1558 "src/sparse.c" break; case 38: @@ -1561,7 +1562,7 @@ yyparse (void) { set_euler((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].i), "ZXZ"); } -#line 1565 "src/sparse.c" +#line 1566 "src/sparse.c" break; case 39: @@ -1569,7 +1570,7 @@ yyparse (void) { set_euler((yyvsp[-6].i), (yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].c)); } -#line 1573 "src/sparse.c" +#line 1574 "src/sparse.c" break; case 40: @@ -1577,13 +1578,13 @@ yyparse (void) { set_line ((yyvsp[0].i)); } -#line 1581 "src/sparse.c" +#line 1582 "src/sparse.c" break; case 43: #line 168 "src/sparse.y" { } -#line 1587 "src/sparse.c" +#line 1588 "src/sparse.c" break; case 44: @@ -1591,23 +1592,23 @@ yyparse (void) { set_ellipse((yyvsp[-8].i), (yyvsp[-6].i), (yyvsp[-3].i), (yyvsp[-1].i)); } -#line 1595 "src/sparse.c" +#line 1596 "src/sparse.c" break; case 45: #line 181 "src/sparse.y" { } -#line 1601 "src/sparse.c" +#line 1602 "src/sparse.c" break; case 46: #line 182 "src/sparse.y" { } -#line 1607 "src/sparse.c" +#line 1608 "src/sparse.c" break; -#line 1611 "src/sparse.c" +#line 1612 "src/sparse.c" default: break; } diff --git a/src/sparse.h b/src/sparse.h index e6a1000..c6607ba 100644 --- a/src/sparse.h +++ b/src/sparse.h @@ -60,9 +60,9 @@ extern int sphere_yydebug; CLOSEPOINT = 266, OPENARR = 267, CLOSEARR = 268, - SIGN = 269, - INT = 270, - FLOAT = 271, + TOK_SIGN = 269, + TOK_INT = 270, + TOK_FLOAT = 271, EULERAXIS = 272 }; #endif @@ -78,9 +78,9 @@ extern int sphere_yydebug; #define CLOSEPOINT 266 #define OPENARR 267 #define CLOSEARR 268 -#define SIGN 269 -#define INT 270 -#define FLOAT 271 +#define TOK_SIGN 269 +#define TOK_INT 270 +#define TOK_FLOAT 271 #define EULERAXIS 272 /* Value type. */ diff --git a/src/sparse.y b/src/sparse.y index 22e8778..0b65d9f 100644 --- a/src/sparse.y +++ b/src/sparse.y @@ -44,9 +44,9 @@ static double human2dec(double d, double m, double s) char c[3]; } -%token SIGN -%token INT -%token FLOAT +%token TOK_SIGN +%token TOK_INT +%token TOK_FLOAT %token EULERAXIS %left COMMA @@ -78,47 +78,47 @@ command: /* unsigned number */ number : - FLOAT { $$ = $1; } - | INT { $$ = $1; } + TOK_FLOAT { $$ = $1; } + | TOK_INT { $$ = $1; } ; /* unsigned longitude */ angle_lat_us : number { $$ = set_angle(0, $1 ); } - | FLOAT DEG { $$ = set_angle(1, human2dec($1, 0, 0) ); } - | INT DEG { $$ = set_angle(1, human2dec($1, 0, 0) ); } - | INT DEG number { $$ = set_angle(1, human2dec($1, $3, 0) ); } - | INT DEG FLOAT MIN { $$ = set_angle(1, human2dec($1, $3, 0) ); } - | INT DEG INT MIN { $$ = set_angle(1, human2dec($1, $3, 0) ); } - | INT DEG INT MIN number { $$ = set_angle(1, human2dec($1, $3, $5) ); } - | INT DEG INT MIN number SEC { $$ = set_angle(1, human2dec($1, $3, $5) ); } + | TOK_FLOAT DEG { $$ = set_angle(1, human2dec($1, 0, 0) ); } + | TOK_INT DEG { $$ = set_angle(1, human2dec($1, 0, 0) ); } + | TOK_INT DEG number { $$ = set_angle(1, human2dec($1, $3, 0) ); } + | TOK_INT DEG TOK_FLOAT MIN { $$ = set_angle(1, human2dec($1, $3, 0) ); } + | TOK_INT DEG TOK_INT MIN { $$ = set_angle(1, human2dec($1, $3, 0) ); } + | TOK_INT DEG TOK_INT MIN number { $$ = set_angle(1, human2dec($1, $3, $5) ); } + | TOK_INT DEG TOK_INT MIN number SEC { $$ = set_angle(1, human2dec($1, $3, $5) ); } ; /* unsigned latitude */ angle_long_us : number { $$ = set_angle(0, $1); } - | FLOAT DEG { $$ = set_angle(1, human2dec($1, 0, 0)); } - | INT DEG { $$ = set_angle(1, human2dec($1, 0, 0)); } - | INT DEG number { $$ = set_angle(1, human2dec($1, $3, 0)); } - | INT DEG FLOAT MIN { $$ = set_angle(1, human2dec($1, $3, 0)); } - | INT DEG INT MIN { $$ = set_angle(1, human2dec($1, $3, 0)); } - | INT DEG INT MIN number { $$ = set_angle(1, human2dec($1, $3, $5)); } - | INT DEG INT MIN number SEC { $$ = set_angle(1, human2dec($1, $3, $5)); } - | INT HOUR number { $$ = set_angle(1, 15 * human2dec($1, $3, 0)); } - | INT HOUR INT MIN number { $$ = set_angle(1, 15 * human2dec($1, $3, $5)); } - | INT HOUR INT MIN number SEC { $$ = set_angle(1, 15 * human2dec($1, $3, $5)); } + | TOK_FLOAT DEG { $$ = set_angle(1, human2dec($1, 0, 0)); } + | TOK_INT DEG { $$ = set_angle(1, human2dec($1, 0, 0)); } + | TOK_INT DEG number { $$ = set_angle(1, human2dec($1, $3, 0)); } + | TOK_INT DEG TOK_FLOAT MIN { $$ = set_angle(1, human2dec($1, $3, 0)); } + | TOK_INT DEG TOK_INT MIN { $$ = set_angle(1, human2dec($1, $3, 0)); } + | TOK_INT DEG TOK_INT MIN number { $$ = set_angle(1, human2dec($1, $3, $5)); } + | TOK_INT DEG TOK_INT MIN number SEC { $$ = set_angle(1, human2dec($1, $3, $5)); } + | TOK_INT HOUR number { $$ = set_angle(1, 15 * human2dec($1, $3, 0)); } + | TOK_INT HOUR TOK_INT MIN number { $$ = set_angle(1, 15 * human2dec($1, $3, $5)); } + | TOK_INT HOUR TOK_INT MIN number SEC { $$ = set_angle(1, 15 * human2dec($1, $3, $5)); } ; /* longitude */ angle_long : angle_long_us { $$ = set_angle_sign($1, 1); } - | SIGN angle_long_us { $$ = set_angle_sign($2, $1); } + | TOK_SIGN angle_long_us { $$ = set_angle_sign($2, $1); } ; /* latitude */ angle_lat : angle_lat_us { $$ = set_angle_sign($1, 1); } - | SIGN angle_lat_us { $$ = set_angle_sign($2, $1); } + | TOK_SIGN angle_lat_us { $$ = set_angle_sign($2, $1); } ; diff --git a/src/sscan.c b/src/sscan.c index 0df711e..50e0e70 100644 --- a/src/sscan.c +++ b/src/sscan.c @@ -1019,17 +1019,17 @@ YY_DECL case 1: YY_RULE_SETUP #line 36 "src/sscan.l" -sphere_yylval.i = (strcmp("-", yytext)) ? (1) : (-1); return SIGN; +sphere_yylval.i = (strcmp("-", yytext)) ? (1) : (-1); return TOK_SIGN; YY_BREAK case 2: YY_RULE_SETUP #line 37 "src/sscan.l" -sphere_yylval.i = atoi(yytext); return INT; +sphere_yylval.i = atoi(yytext); return TOK_INT; YY_BREAK case 3: YY_RULE_SETUP #line 38 "src/sscan.l" -sphere_yylval.d = atof(yytext); return FLOAT; +sphere_yylval.d = atof(yytext); return TOK_FLOAT; YY_BREAK case 4: YY_RULE_SETUP diff --git a/src/sscan.l b/src/sscan.l index 99bd8ac..d3103b6 100644 --- a/src/sscan.l +++ b/src/sscan.l @@ -33,9 +33,9 @@ real ({int})?\.({int}) float ({int}|{real})([eE]{sign}{int})? %% -{sign} sphere_yylval.i = (strcmp("-", yytext)) ? (1) : (-1); return SIGN; -{int} sphere_yylval.i = atoi(yytext); return INT; -{float} sphere_yylval.d = atof(yytext); return FLOAT; +{sign} sphere_yylval.i = (strcmp("-", yytext)) ? (1) : (-1); return TOK_SIGN; +{int} sphere_yylval.i = atoi(yytext); return TOK_INT; +{float} sphere_yylval.d = atof(yytext); return TOK_FLOAT; [x-zX-Z]{3} memcpy(&sphere_yylval.c[0], yytext, 3); return EULERAXIS; h return HOUR; d return DEG; From 06074880bfff8024e269abf297794ccb04f82a84 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Sat, 25 May 2024 17:29:15 +0300 Subject: [PATCH 04/21] Bump version up to 1.5.2 --- Makefile | 3 +++ Makefile.common.mk | 2 +- expected/version.out | 2 +- pg_sphere.control | 2 +- upgrade_scripts/pg_sphere--1.5.1--1.5.2.sql.in | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 upgrade_scripts/pg_sphere--1.5.1--1.5.2.sql.in diff --git a/Makefile b/Makefile index 78f2dc5..782961c 100644 --- a/Makefile +++ b/Makefile @@ -218,6 +218,9 @@ pg_sphere--1.4.2--1.5.0.sql: pg_sphere--1.5.0--1.5.1.sql: cat upgrade_scripts/$@.in $^ > $@ +pg_sphere--1.5.1--1.5.2.sql: + cat upgrade_scripts/$@.in $^ > $@ + # end of local stuff src/sscan.o : src/sparse.c diff --git a/Makefile.common.mk b/Makefile.common.mk index be82047..8963227 100644 --- a/Makefile.common.mk +++ b/Makefile.common.mk @@ -5,4 +5,4 @@ #---------------------------------------------------------------------------- EXTENSION := pg_sphere -PGSPHERE_VERSION := 1.5.1 +PGSPHERE_VERSION := 1.5.2 diff --git a/expected/version.out b/expected/version.out index ffad8f5..c1f0efe 100644 --- a/expected/version.out +++ b/expected/version.out @@ -2,6 +2,6 @@ SELECT pg_sphere_version(); pg_sphere_version ------------------- - 1.5.1 + 1.5.2 (1 row) diff --git a/pg_sphere.control b/pg_sphere.control index 1e73251..85f7589 100644 --- a/pg_sphere.control +++ b/pg_sphere.control @@ -1,5 +1,5 @@ # pg_sphere extension comment = 'spherical objects with useful functions, operators and index support' -default_version = '1.5.1' +default_version = '1.5.2' module_pathname = '$libdir/pg_sphere' relocatable = true diff --git a/upgrade_scripts/pg_sphere--1.5.1--1.5.2.sql.in b/upgrade_scripts/pg_sphere--1.5.1--1.5.2.sql.in new file mode 100644 index 0000000..3ff6a66 --- /dev/null +++ b/upgrade_scripts/pg_sphere--1.5.1--1.5.2.sql.in @@ -0,0 +1,2 @@ +-- Upgrade: 1.5.1 -> 1.5.2 +-- Nothing to do yet From e1dee2488847482d9cee29b6ff07a5e127c1cedb Mon Sep 17 00:00:00 2001 From: Markus Demleitner Date: Wed, 15 May 2024 15:35:20 +0200 Subject: [PATCH 05/21] Now more carefully nulling out null inputs in epoch_prop. This is so we do not invent values for pm, parallax, or rv. We are actually a bit over-cautious and invalidate both PMs even if only one is missing. This is because PMs mix, and hence there are traces of the invented 0 in the other component of the PM. Similarly, when the parallax is missing or bad, the RV would be heavily contaminated; in these cases, we copy through the original RV, as it may still be useful and certainly will not be grossly wrong. (sorry about a few whitespace diffs introduced by killing trailing whitespace in sql/epochprop.sql and src/epochprop.c) --- doc/functions.sgm | 9 ++++-- expected/epochprop.out | 62 +++++++++++++++++++++--------------------- sql/epochprop.sql | 26 +++++++++--------- src/epochprop.c | 37 +++++++++++++++---------- src/epochprop.h | 11 +------- 5 files changed, 73 insertions(+), 72 deletions(-) diff --git a/doc/functions.sgm b/doc/functions.sgm index 232b755..047b7f1 100644 --- a/doc/functions.sgm +++ b/doc/functions.sgm @@ -867,9 +867,12 @@ It is an error to have either pos or delta_t NULL. For all other arguments, NULLs are turned into 0s, except for parallax, - where some very small default is put in. In that case, - both parallax and radial_velocity will be NULL in the output - array. + where some very small default is put in. Whatever is NULL + on the input is NULL on the output. In addition, we null + out a non-NULL input on one component of the proper motion + if the other component is NULL, and we null out the radial + velocity if the parallax is missing, as it would be horribly + off with the propagation algorithm we use here. diff --git a/expected/epochprop.out b/expected/epochprop.out index 3a52832..1111f1a 100644 --- a/expected/epochprop.out +++ b/expected/epochprop.out @@ -1,5 +1,5 @@ -SET extra_float_digits = 2; -SELECT +SET extra_float_digits = 1; +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -7,7 +7,7 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), 546.9759, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, -100) AS tp) AS q; @@ -16,7 +16,7 @@ FROM ( 269.4742714391 | 4.4072939987 | 543.624 | -791.442 | 10235.412 | -110.450 (1 row) -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -24,16 +24,16 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), 0, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, -100) AS tp) AS q; - to_char | to_char | to_char | to_char | to_char | to_char ------------------+-----------------+---------+----------+------------+--------- - 269.4744079540 | 4.4055337210 | | -801.210 | 10361.762 | + to_char | to_char | to_char | to_char | to_char | to_char +-----------------+-----------------+----------+----------+------------+---------- + 269.4744079540 | 4.4055337210 | .000 | -801.210 | 10361.762 | -110.000 (1 row) -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -41,16 +41,16 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), NULL, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, -100) AS tp) AS q; - to_char | to_char | to_char | to_char | to_char | to_char ------------------+-----------------+---------+----------+------------+--------- - 269.4744079540 | 4.4055337210 | | -801.210 | 10361.762 | + to_char | to_char | to_char | to_char | to_char | to_char +-----------------+-----------------+---------+----------+------------+---------- + 269.4744079540 | 4.4055337210 | | -801.210 | 10361.762 | -110.000 (1 row) -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -58,16 +58,16 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), 23, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), NULL, 20) AS tp) AS q; - to_char | to_char | to_char | to_char | to_char | to_char ------------------+-----------------+----------+----------+------------+---------- - 269.4476085384 | 4.7509315989 | 23.000 | -801.617 | 10361.984 | 2.159 + to_char | to_char | to_char | to_char | to_char | to_char +-----------------+-----------------+----------+----------+------------+--------- + 269.4476085384 | 4.7509315989 | 23.000 | -801.617 | 10361.984 | (1 row) -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -75,13 +75,13 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), 23, NULL, RADIANS(10362/3.6e6), -110, 120) AS tp) AS q; - to_char | to_char | to_char | to_char | to_char | to_char ------------------+-----------------+----------+----------+------------+---------- - 269.4520769500 | 5.0388680565 | 23.007 | -.000 | 10368.061 | -97.120 + to_char | to_char | to_char | to_char | to_char | to_char +-----------------+-----------------+----------+---------+---------+---------- + 269.4520769500 | 4.6933649660 | 23.007 | | | -110.000 (1 row) SELECT epoch_prop(NULL, @@ -89,20 +89,20 @@ SELECT epoch_prop(NULL, 0.01 , RADIANS(10362/3.6e6), -110, 120); ERROR: NULL position not supported in epoch propagation -SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), +SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), 23, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, 20) AS tp; - tp ---------------------------------------------- - (4.7027479265831289 , 0.082919450934599334) + tp +------------------------------------------- + (4.702747926583129 , 0.08291945093459933) (1 row) -SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), +SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), 20) AS tp; - tp ---------------------------------------------- - (4.7027479306195161 , 0.082919398938087627) + tp +------------------------------------------- + (4.702747930619516 , 0.08291939893808763) (1 row) diff --git a/sql/epochprop.sql b/sql/epochprop.sql index d8ae2b7..a6c69dd 100644 --- a/sql/epochprop.sql +++ b/sql/epochprop.sql @@ -1,6 +1,6 @@ -SET extra_float_digits = 2; +SET extra_float_digits = 1; -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -8,12 +8,12 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), 546.9759, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, -100) AS tp) AS q; -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -21,12 +21,12 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), 0, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, -100) AS tp) AS q; -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -34,12 +34,12 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), NULL, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, -100) AS tp) AS q; -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -47,12 +47,12 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), 23, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), NULL, 20) AS tp) AS q; -SELECT +SELECT to_char(DEGREES(tp[1]), '999D9999999999'), to_char(DEGREES(tp[2]), '999D9999999999'), to_char(tp[3], '999D999'), @@ -60,7 +60,7 @@ SELECT to_char(DEGREES(tp[5])*3.6e6, '99999D999'), to_char(tp[6], '999D999') FROM ( - SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), + SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), 23, NULL, RADIANS(10362/3.6e6), -110, 120) AS tp) AS q; @@ -70,11 +70,11 @@ SELECT epoch_prop(NULL, 0.01 , RADIANS(10362/3.6e6), -110, 120); -SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), +SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), 23, RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, 20) AS tp; -SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), +SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), 20) AS tp; diff --git a/src/epochprop.c b/src/epochprop.c index ab9abc8..12ad621 100644 --- a/src/epochprop.c +++ b/src/epochprop.c @@ -133,6 +133,7 @@ epoch_prop(PG_FUNCTION_ARGS) { phasevec input, output; ArrayType *result; Datum retvals[6]; + bool output_null[6] = {0, 0, 0, 0, 0, 0}; if (PG_ARGISNULL(0)) { ereport(ERROR, @@ -141,25 +142,29 @@ epoch_prop(PG_FUNCTION_ARGS) { memcpy(&(input.pos), (void*)PG_GETARG_POINTER(0), sizeof(SPoint)); if (PG_ARGISNULL(1)) { input.parallax = 0; + output_null[2] = 1; + /* The way we do our computation, with a bad parallax the RV + will be horribly off, too, so null this out, too; if avaialble, + we will fiddle in the original RV below again. */ + output_null[5] = 1; } else { input.parallax = PG_GETARG_FLOAT8(1); } input.parallax_valid = fabs(input.parallax) > PX_MIN; - - if (PG_ARGISNULL(2)) { - input.pm[0] = 0; - } else { - input.pm[0] = PG_GETARG_FLOAT8(2); - } - if (PG_ARGISNULL(3)) { + if (PG_ARGISNULL(2) || PG_ARGISNULL(3)) { + input.pm[0] = 0; input.pm[1] = 0; + output_null[3] = 1; + output_null[4] = 1; } else { + input.pm[0] = PG_GETARG_FLOAT8(2); input.pm[1] = PG_GETARG_FLOAT8(3); } if (PG_ARGISNULL(4)) { input.rv = 0; + output_null[5] = 1; } else { input.rv = PG_GETARG_FLOAT8(4); } @@ -172,6 +177,15 @@ epoch_prop(PG_FUNCTION_ARGS) { propagate_phasevec(&input, delta_t, &output); + /* If we have an invalid parallax but a good RV, preserve the original, + untransformed RV on output. See + https://github.com/ivoa-std/udf-catalogue/pull/20#issuecomment-2115053757 + for the rationale. */ + if (!PG_ARGISNULL(4) && !input.parallax_valid) { + output_null[5] = 0; + output.rv = input.rv; + } + /* change to internal units: rad, rad/yr, mas, and km/s */ retvals[0] = Float8GetDatum(output.pos.lng); retvals[1] = Float8GetDatum(output.pos.lat); @@ -181,7 +195,6 @@ epoch_prop(PG_FUNCTION_ARGS) { retvals[5] = Float8GetDatum(output.rv); { - bool isnull[6] = {0, 0, 0, 0, 0, 0}; int lower_bounds[1] = {1}; int dims[1] = {6}; #ifdef USE_FLOAT8_BYVAL @@ -190,13 +203,7 @@ epoch_prop(PG_FUNCTION_ARGS) { bool embyval = false; #endif - if (! output.parallax_valid) { - /* invalidate parallax and rv */ - isnull[2] = 1; - isnull[5] = 1; - } - - result = construct_md_array(retvals, isnull, 1, dims, lower_bounds, + result = construct_md_array(retvals, output_null, 1, dims, lower_bounds, FLOAT8OID, sizeof(float8), embyval, 'd'); } PG_RETURN_ARRAYTYPE_P(result); diff --git a/src/epochprop.h b/src/epochprop.h index a93e4c3..3b61a02 100644 --- a/src/epochprop.h +++ b/src/epochprop.h @@ -6,15 +6,6 @@ extern Datum epoch_prop(PG_FUNCTION_ARGS); -/* a cartesian point; this is like geo_decl's point, but you can't -have both geo_decls and pg_sphere right now (both define a type Point, -not to mention they have different ideas on EPSILON */ -typedef struct s_cpoint -{ - double x, - y; -} CPoint; - typedef struct s_phasevec { SPoint pos; /* Position as an SPoint */ @@ -22,5 +13,5 @@ typedef struct s_phasevec * longitude has cos(lat) applied */ double parallax; /* in rad */ double rv; /* radial velocity in km/s */ - int parallax_valid; /* 1 if the parallax really is a NULL */ + int parallax_valid; /* 1 if we accept the parallax as physical */ } phasevec; From adda8984d20fa13d7b017c59e76a3e5ac905264c Mon Sep 17 00:00:00 2001 From: Ed Sabol Date: Sun, 2 Jun 2024 15:52:30 -0400 Subject: [PATCH 06/21] Issue #125: Add PostgreSQL 17 builds to CI workflow This merge request addresses issue #125 by updating the GitHub Actions CI workflow to build and test on PostrgeSQL 17. --- .github/workflows/build-and-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-check.yml b/.github/workflows/build-and-check.yml index a4247b8..f7633b5 100644 --- a/.github/workflows/build-and-check.yml +++ b/.github/workflows/build-and-check.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - pg_version: [10, 11, 12, 13, 14, 15, 16] + pg_version: [10, 11, 12, 13, 14, 15, 16, 17] use_healpix: [0, 1] name: PostgreSQL ${{ matrix.pg_version }} - USE_HEALPIX=${{ matrix.use_healpix }} @@ -29,7 +29,7 @@ jobs: xsltproc \ fop - - name: Install Postgres + - name: Install PostgreSQL run: sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -p -v ${{ matrix.pg_version }} -i - name: Clone pgSphere From bd5915ad7a06f2494dedc6f6fc44999a5002e100 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Mon, 14 Oct 2024 16:00:57 +0300 Subject: [PATCH 07/21] Enable manual run of the build workflow --- .github/workflows/build-and-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-and-check.yml b/.github/workflows/build-and-check.yml index f7633b5..6038637 100644 --- a/.github/workflows/build-and-check.yml +++ b/.github/workflows/build-and-check.yml @@ -3,6 +3,9 @@ name: Build and Check on: push: pull_request: + workflow_dispatch: + schedule: + - cron: '0 0 * * 5' jobs: build_and_test: From dcdc52ff2866c2abe13951b9f257c118d2d4bcb8 Mon Sep 17 00:00:00 2001 From: Ed Sabol Date: Tue, 15 Oct 2024 15:51:30 -0400 Subject: [PATCH 08/21] Update actions/upload-artifact version in CI workflow This PR updates the version number on `actions/upload-artifact` in `.github/workflows/build-and-check.yml` in order to silence the following warning: > The following actions use a deprecated Node.js version and will be forced to run on node20: actions/upload-artifact@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ https://github.com/actions/upload-artifact says: > actions/upload-artifact@v3 is scheduled for deprecation on November 30, 2024. [Learn more.](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/) Similarly, v1/v2 are scheduled for deprecation on June 30, 2024. Please update your workflow to use v4 of the artifact actions. This deprecation will not impact any existing versions of GitHub Enterprise Server being used by customers. --- .github/workflows/build-and-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-check.yml b/.github/workflows/build-and-check.yml index 6038637..b89bdba 100644 --- a/.github/workflows/build-and-check.yml +++ b/.github/workflows/build-and-check.yml @@ -75,7 +75,7 @@ jobs: uses: rlespinasse/github-slug-action@v4 - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: success() || failure() with: name: ${{ env.GITHUB_REF_SLUG_URL }}-pg${{ matrix.pg_version }}-use-healpix-${{ matrix.use_healpix }}-${{ github.run_id }} From e059e5e462eb902614e8aaa91ae88a9c1100600c Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Mon, 28 Oct 2024 09:30:30 +0300 Subject: [PATCH 09/21] Build and check workflow for MS Windows --- .../build-and-check-windows-latest.yml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/build-and-check-windows-latest.yml diff --git a/.github/workflows/build-and-check-windows-latest.yml b/.github/workflows/build-and-check-windows-latest.yml new file mode 100644 index 0000000..4189fc2 --- /dev/null +++ b/.github/workflows/build-and-check-windows-latest.yml @@ -0,0 +1,81 @@ +name: Build and Check (windows-latest) + +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 0 * * 5' + +jobs: + build_and_test: + + runs-on: windows-latest + + strategy: + fail-fast: false + matrix: + pg_version: [10, 11, 12, 13, 14, 15, 16, 17] + use_healpix: [0] + + name: PostgreSQL ${{ matrix.pg_version }} - USE_HEALPIX=${{ matrix.use_healpix }} (windows-latest) + + defaults: + run: + shell: msys2 {0} + + steps: + + - name: Install MSYS2 + uses: msys2/setup-msys2@v2 + with: + update: true + msystem: mingw64 + install: >- + base-devel + curl + git + make + perl + flex + bison + diffutils + mingw-w64-x86_64-zlib + mingw-w64-x86_64-icu + mingw-w64-x86_64-gcc + + - name: Install PostgreSQL + run: | + echo "Workspace: ${GITHUB_WORKSPACE}" + git clone --single-branch -b "REL_${{ matrix.pg_version }}_STABLE" git://git.postgresql.org/git/postgresql.git + cd ${GITHUB_WORKSPACE}/postgresql + ./configure --enable-cassert --without-icu + make -j$(nproc) + make install + + - name: Clone pgSphere + uses: actions/checkout@v4 + with: + ref: 'master' + fetch-depth: 1 + + - name: Build pgSphere + run: | + make --keep-going -j$(nproc) PROFILE='-Werror -Wall' USE_HEALPIX=0 + make USE_HEALPIX=0 install + + - name: Test pgSphere + run: | + initdb -D pgdata -U postgres + pg_ctl -D pgdata -l postgres.log start + make USE_HEALPIX=0 installcheck + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: ${{ env.GITHUB_REF_SLUG_URL }}-pg${{ matrix.pg_version }}-use-healpix-${{ matrix.use_healpix }}-${{ github.run_id }} + if-no-files-found: ignore + path: | + ./**/*.log + ./**/*.diffs From 50268d5ac33893c41dcf5e95bfffc7eefc470d0d Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Tue, 5 Nov 2024 13:48:10 +0300 Subject: [PATCH 10/21] Fix found issues after review --- .github/workflows/build-and-check-windows-latest.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-and-check-windows-latest.yml b/.github/workflows/build-and-check-windows-latest.yml index 4189fc2..b4c8158 100644 --- a/.github/workflows/build-and-check-windows-latest.yml +++ b/.github/workflows/build-and-check-windows-latest.yml @@ -70,6 +70,10 @@ jobs: pg_ctl -D pgdata -l postgres.log start make USE_HEALPIX=0 installcheck + - name: Show installcheck regression.diffs + if: ${{ failure() }} + run: cat regression.diffs + - name: Upload artifacts uses: actions/upload-artifact@v4 if: success() || failure() From 37897e98169c0e1fdcb8101764f095c94aa081a6 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Thu, 7 Nov 2024 12:47:14 +0300 Subject: [PATCH 11/21] Add crushtest in build-and-check-windows-latest workflow --- .../workflows/build-and-check-windows-latest.yml | 14 +++++++++++++- expected/init_extended.out | 6 +++--- sql/init_extended.sql | 6 +++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-check-windows-latest.yml b/.github/workflows/build-and-check-windows-latest.yml index b4c8158..1bbb43e 100644 --- a/.github/workflows/build-and-check-windows-latest.yml +++ b/.github/workflows/build-and-check-windows-latest.yml @@ -64,16 +64,28 @@ jobs: make --keep-going -j$(nproc) PROFILE='-Werror -Wall' USE_HEALPIX=0 make USE_HEALPIX=0 install - - name: Test pgSphere + - name: Test pgSphere (installcheck) run: | initdb -D pgdata -U postgres pg_ctl -D pgdata -l postgres.log start make USE_HEALPIX=0 installcheck + pg_ctl -D pgdata -l postgres_installcheck.log stop + rm -rf pgdata - name: Show installcheck regression.diffs if: ${{ failure() }} run: cat regression.diffs + - name: Test pgSphere (crushtest) + run: | + initdb -D pgdata -U postgres + pg_ctl -D pgdata -l postgres_crushtest.log start + make USE_HEALPIX=0 crushtest + + - name: Show crushtest regression.diffs + if: ${{ failure() }} + run: cat regression.diffs + - name: Upload artifacts uses: actions/upload-artifact@v4 if: success() || failure() diff --git a/expected/init_extended.out b/expected/init_extended.out index 382a0dc..adeaa8d 100644 --- a/expected/init_extended.out +++ b/expected/init_extended.out @@ -1,18 +1,18 @@ -- indexed operations..... -- spoint_data and scircle_data tables have to be created and indexed using -\! testsuite/gen_point.pl 1 > results/gen_point_1.sql +\! perl testsuite/gen_point.pl 1 > results/gen_point_1.sql \i results/gen_point_1.sql CREATE TABLE spoint_data (sp spoint); COPY spoint_data (sp) FROM stdin; CREATE INDEX sp_idx ON spoint_data USING gist (sp); -- and -\! testsuite/gen_circle.pl 1 0.1 > results/gen_circle_1_0.1.sql +\! perl testsuite/gen_circle.pl 1 0.1 > results/gen_circle_1_0.1.sql \i results/gen_circle_1_0.1.sql CREATE TABLE scircle_data (sc scircle); COPY scircle_data (sc) FROM stdin; CREATE INDEX sc_idx ON scircle_data USING gist (sc); -- -\! testsuite/gen_poly.pl 1 0.1 4 > results/gen_poly_1_0.1_4.sql +\! perl testsuite/gen_poly.pl 1 0.1 4 > results/gen_poly_1_0.1_4.sql \i results/gen_poly_1_0.1_4.sql CREATE TABLE spoly_data (sp spoly); COPY spoly_data (sp) FROM stdin; diff --git a/sql/init_extended.sql b/sql/init_extended.sql index 800d7e4..b28f0ef 100644 --- a/sql/init_extended.sql +++ b/sql/init_extended.sql @@ -2,15 +2,15 @@ -- spoint_data and scircle_data tables have to be created and indexed using -\! testsuite/gen_point.pl 1 > results/gen_point_1.sql +\! perl testsuite/gen_point.pl 1 > results/gen_point_1.sql \i results/gen_point_1.sql -- and -\! testsuite/gen_circle.pl 1 0.1 > results/gen_circle_1_0.1.sql +\! perl testsuite/gen_circle.pl 1 0.1 > results/gen_circle_1_0.1.sql \i results/gen_circle_1_0.1.sql -- -\! testsuite/gen_poly.pl 1 0.1 4 > results/gen_poly_1_0.1_4.sql +\! perl testsuite/gen_poly.pl 1 0.1 4 > results/gen_poly_1_0.1_4.sql \i results/gen_poly_1_0.1_4.sql From 6c244248c9daa5cb1cf0bfb7e2de37ad70c90f46 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Thu, 7 Nov 2024 13:13:18 +0300 Subject: [PATCH 12/21] Fix pgsphere cloned branch --- .github/workflows/build-and-check-windows-latest.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build-and-check-windows-latest.yml b/.github/workflows/build-and-check-windows-latest.yml index 1bbb43e..658da28 100644 --- a/.github/workflows/build-and-check-windows-latest.yml +++ b/.github/workflows/build-and-check-windows-latest.yml @@ -55,9 +55,6 @@ jobs: - name: Clone pgSphere uses: actions/checkout@v4 - with: - ref: 'master' - fetch-depth: 1 - name: Build pgSphere run: | From 461e873748d68498db50893acd6397c5f0ec9239 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Thu, 7 Nov 2024 14:57:11 +0300 Subject: [PATCH 13/21] Change log file name --- .github/workflows/build-and-check-windows-latest.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-check-windows-latest.yml b/.github/workflows/build-and-check-windows-latest.yml index 658da28..e2d7b27 100644 --- a/.github/workflows/build-and-check-windows-latest.yml +++ b/.github/workflows/build-and-check-windows-latest.yml @@ -64,9 +64,9 @@ jobs: - name: Test pgSphere (installcheck) run: | initdb -D pgdata -U postgres - pg_ctl -D pgdata -l postgres.log start + pg_ctl -D pgdata -l postgres_installcheck.log start make USE_HEALPIX=0 installcheck - pg_ctl -D pgdata -l postgres_installcheck.log stop + pg_ctl -D pgdata stop rm -rf pgdata - name: Show installcheck regression.diffs @@ -78,6 +78,7 @@ jobs: initdb -D pgdata -U postgres pg_ctl -D pgdata -l postgres_crushtest.log start make USE_HEALPIX=0 crushtest + pg_ctl -D pgdata stop - name: Show crushtest regression.diffs if: ${{ failure() }} From 3bf016e667e6beab0616ad5089a20872b9a4e8ba Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Wed, 8 Oct 2025 17:47:16 +0300 Subject: [PATCH 14/21] Fix Build and Check under MS Windows workflow --- .github/workflows/build-and-check-windows-latest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-check-windows-latest.yml b/.github/workflows/build-and-check-windows-latest.yml index e2d7b27..552fc70 100644 --- a/.github/workflows/build-and-check-windows-latest.yml +++ b/.github/workflows/build-and-check-windows-latest.yml @@ -47,7 +47,7 @@ jobs: - name: Install PostgreSQL run: | echo "Workspace: ${GITHUB_WORKSPACE}" - git clone --single-branch -b "REL_${{ matrix.pg_version }}_STABLE" git://git.postgresql.org/git/postgresql.git + git clone --single-branch -b "REL_${{ matrix.pg_version }}_STABLE" https://git.postgresql.org/git/postgresql.git cd ${GITHUB_WORKSPACE}/postgresql ./configure --enable-cassert --without-icu make -j$(nproc) From 4f961515b781edd26a26999a333ee2f0bd37d55b Mon Sep 17 00:00:00 2001 From: Ed Sabol <22986767+esabol@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:04:41 -0400 Subject: [PATCH 15/21] Issue #139: Add PostgreSQL 18 builds to CI workflow --- .github/workflows/build-and-check-windows-latest.yml | 2 +- .github/workflows/build-and-check.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-check-windows-latest.yml b/.github/workflows/build-and-check-windows-latest.yml index 552fc70..0db8d1f 100644 --- a/.github/workflows/build-and-check-windows-latest.yml +++ b/.github/workflows/build-and-check-windows-latest.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - pg_version: [10, 11, 12, 13, 14, 15, 16, 17] + pg_version: [10, 11, 12, 13, 14, 15, 16, 17, 18] use_healpix: [0] name: PostgreSQL ${{ matrix.pg_version }} - USE_HEALPIX=${{ matrix.use_healpix }} (windows-latest) diff --git a/.github/workflows/build-and-check.yml b/.github/workflows/build-and-check.yml index b89bdba..bfc758b 100644 --- a/.github/workflows/build-and-check.yml +++ b/.github/workflows/build-and-check.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - pg_version: [10, 11, 12, 13, 14, 15, 16, 17] + pg_version: [10, 11, 12, 13, 14, 15, 16, 17, 18] use_healpix: [0, 1] name: PostgreSQL ${{ matrix.pg_version }} - USE_HEALPIX=${{ matrix.use_healpix }} From bf634165652ef60ddc5c919c1c5a9a69eb8a0882 Mon Sep 17 00:00:00 2001 From: Ed Sabol <22986767+esabol@users.noreply.github.com> Date: Wed, 8 Oct 2025 14:51:10 -0400 Subject: [PATCH 16/21] Applied patch from @vitcpp to fix selectivity test on PostgreSQL 18 --- expected/gist_support_1.out | 155 +++++++++++++++++++++++++ expected/moc100_1.out | 220 ++++++++++++++++++++++++++++++++++++ expected/moc1_1.out | 120 ++++++++++++++++++++ expected/moc_options.out | 6 +- expected/moc_options_1.out | 43 +++++++ expected/selectivity.out | 3 +- expected/selectivity_1.out | 3 +- expected/selectivity_2.out | 125 ++++++++++++++++++++ sql/moc_options.sql | 6 +- sql/selectivity.sql | 3 +- 10 files changed, 675 insertions(+), 9 deletions(-) create mode 100644 expected/gist_support_1.out create mode 100644 expected/moc100_1.out create mode 100644 expected/moc1_1.out create mode 100644 expected/moc_options_1.out create mode 100644 expected/selectivity_2.out diff --git a/expected/gist_support_1.out b/expected/gist_support_1.out new file mode 100644 index 0000000..2966563 --- /dev/null +++ b/expected/gist_support_1.out @@ -0,0 +1,155 @@ +-- spoint_dwithin function selectivity +set jit = off; -- suppress extra planning output +select explain('select * from spoint10k where spoint_dwithin(star, spoint(1,1), 1)'); + explain +-------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on spoint10k (rows=2298 width=16) (actual rows=3009.00 loops=1) + Filter: spoint_dwithin(star, '(1 , 1)'::spoint, '1'::double precision) + Rows Removed by Filter: 1560 + Heap Blocks: exact=55 + -> Bitmap Index Scan on spoint10k_star_idx (rows=2298 width=0) (actual rows=4569.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 1>'::scircle) +(6 rows) + +select explain('select * from spoint10k where spoint_dwithin(star, spoint(1,1), .1)'); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on spoint10k (rows=25 width=16) (actual rows=29.00 loops=1) + Filter: spoint_dwithin(star, '(1 , 1)'::spoint, '0.1'::double precision) + Rows Removed by Filter: 19 + Heap Blocks: exact=32 + -> Bitmap Index Scan on spoint10k_star_idx (rows=25 width=0) (actual rows=48.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.1>'::scircle) +(6 rows) + +select explain('select * from spoint10k where spoint_dwithin(star, spoint(1,1), .01)'); + explain +------------------------------------------------------------------------------------------------ + Index Scan using spoint10k_star_idx on spoint10k (rows=1 width=16) (actual rows=1.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.01>'::scircle) +(2 rows) + +select explain('select * from spoint10k where spoint_dwithin(spoint(1,1), star, 1)'); + explain +-------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on spoint10k (rows=2298 width=16) (actual rows=3009.00 loops=1) + Filter: spoint_dwithin('(1 , 1)'::spoint, star, '1'::double precision) + Rows Removed by Filter: 1560 + Heap Blocks: exact=55 + -> Bitmap Index Scan on spoint10k_star_idx (rows=2298 width=0) (actual rows=4569.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 1>'::scircle) +(6 rows) + +select explain('select * from spoint10k where spoint_dwithin(spoint(1,1), star, .1)'); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on spoint10k (rows=25 width=16) (actual rows=29.00 loops=1) + Filter: spoint_dwithin('(1 , 1)'::spoint, star, '0.1'::double precision) + Rows Removed by Filter: 19 + Heap Blocks: exact=32 + -> Bitmap Index Scan on spoint10k_star_idx (rows=25 width=0) (actual rows=48.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.1>'::scircle) +(6 rows) + +select explain('select * from spoint10k where spoint_dwithin(spoint(1,1), star, .01)'); + explain +------------------------------------------------------------------------------------------------ + Index Scan using spoint10k_star_idx on spoint10k (rows=1 width=16) (actual rows=1.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.01>'::scircle) +(2 rows) + +select explain('select * from spoint10k a join spoint10k b on spoint_dwithin(a.star, b.star, 1)', do_analyze := 'false'); + explain +--------------------------------------------------------------------------------------- + Nested Loop (rows=22984885 width=32) + -> Seq Scan on spoint10k a (rows=10000 width=16) + -> Index Scan using spoint10k_star_idx on spoint10k b (rows=2298 width=16) + Index Cond: (star OPERATOR(public.<@) scircle(a.star, '1'::double precision)) +(4 rows) + +select explain('select * from spoint10k a join spoint10k b on spoint_dwithin(a.star, b.star, .1)'); + explain +-------------------------------------------------------------------------------------------------------------- + Nested Loop (rows=249792 width=32) (actual rows=505342.00 loops=1) + -> Seq Scan on spoint10k a (rows=10000 width=16) (actual rows=10000.00 loops=1) + -> Index Scan using spoint10k_star_idx on spoint10k b (rows=25 width=16) (actual rows=50.53 loops=10000) + Index Cond: (star OPERATOR(public.<@) scircle(a.star, '0.1'::double precision)) + Rows Removed by Index Recheck: 31 +(5 rows) + +select explain('select * from spoint10k a join spoint10k b on spoint_dwithin(a.star, b.star, .01)'); + explain +------------------------------------------------------------------------------------------------------------ + Nested Loop (rows=2500 width=32) (actual rows=17614.00 loops=1) + -> Seq Scan on spoint10k a (rows=10000 width=16) (actual rows=10000.00 loops=1) + -> Index Scan using spoint10k_star_idx on spoint10k b (rows=1 width=16) (actual rows=1.76 loops=10000) + Index Cond: (star OPERATOR(public.<@) scircle(a.star, '0.01'::double precision)) + Rows Removed by Index Recheck: 1 +(5 rows) + +-- spoint_dwithin is symmetric in the first two arguments +select explain('select * from spoint10k a join spoint10k b on spoint_dwithin(a.star, b.star, .01) + where spoint_dwithin(a.star, spoint(1,1), .1)'); + explain +--------------------------------------------------------------------------------------------------------- + Nested Loop (rows=6 width=32) (actual rows=33.00 loops=1) + -> Bitmap Heap Scan on spoint10k a (rows=25 width=16) (actual rows=29.00 loops=1) + Filter: spoint_dwithin(star, '(1 , 1)'::spoint, '0.1'::double precision) + Rows Removed by Filter: 19 + Heap Blocks: exact=32 + -> Bitmap Index Scan on spoint10k_star_idx (rows=25 width=0) (actual rows=48.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.1>'::scircle) + -> Index Scan using spoint10k_star_idx on spoint10k b (rows=1 width=16) (actual rows=1.14 loops=29) + Index Cond: (star OPERATOR(public.<@) scircle(a.star, '0.01'::double precision)) + Rows Removed by Index Recheck: 0 +(10 rows) + +select explain('select * from spoint10k a join spoint10k b on spoint_dwithin(b.star, a.star, .01) + where spoint_dwithin(a.star, spoint(1,1), .1)'); + explain +--------------------------------------------------------------------------------------------------------- + Nested Loop (rows=6 width=32) (actual rows=33.00 loops=1) + -> Bitmap Heap Scan on spoint10k a (rows=25 width=16) (actual rows=29.00 loops=1) + Filter: spoint_dwithin(star, '(1 , 1)'::spoint, '0.1'::double precision) + Rows Removed by Filter: 19 + Heap Blocks: exact=32 + -> Bitmap Index Scan on spoint10k_star_idx (rows=25 width=0) (actual rows=48.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.1>'::scircle) + -> Index Scan using spoint10k_star_idx on spoint10k b (rows=1 width=16) (actual rows=1.14 loops=29) + Index Cond: (star OPERATOR(public.<@) scircle(a.star, '0.01'::double precision)) + Rows Removed by Index Recheck: 0 +(10 rows) + +-- both sides indexable, check if the planner figures out the better choice +select explain('select * from spoint10k a join spoint10k b on spoint_dwithin(a.star, b.star, .01) + where spoint_dwithin(a.star, spoint(1,1), .1) and spoint_dwithin(b.star, spoint(1,1), .05)'); + explain +------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop (rows=1 width=32) (actual rows=16.00 loops=1) + -> Bitmap Heap Scan on spoint10k b (rows=6 width=16) (actual rows=12.00 loops=1) + Filter: spoint_dwithin(star, '(1 , 1)'::spoint, '0.05'::double precision) + Rows Removed by Filter: 4 + Heap Blocks: exact=14 + -> Bitmap Index Scan on spoint10k_star_idx (rows=6 width=0) (actual rows=16.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.05>'::scircle) + -> Index Scan using spoint10k_star_idx on spoint10k a (rows=1 width=16) (actual rows=1.33 loops=12) + Index Cond: ((star OPERATOR(public.<@) scircle(b.star, '0.01'::double precision)) AND (star <@ '<(1 , 1) , 0.1>'::scircle)) + Rows Removed by Index Recheck: 0 +(10 rows) + +select explain('select * from spoint10k a join spoint10k b on spoint_dwithin(a.star, b.star, .01) + where spoint_dwithin(a.star, spoint(1,1), .05) and spoint_dwithin(b.star, spoint(1,1), .1)'); + explain +------------------------------------------------------------------------------------------------------------------------------------- + Nested Loop (rows=1 width=32) (actual rows=16.00 loops=1) + -> Bitmap Heap Scan on spoint10k a (rows=6 width=16) (actual rows=12.00 loops=1) + Filter: spoint_dwithin(star, '(1 , 1)'::spoint, '0.05'::double precision) + Rows Removed by Filter: 4 + Heap Blocks: exact=14 + -> Bitmap Index Scan on spoint10k_star_idx (rows=6 width=0) (actual rows=16.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.05>'::scircle) + -> Index Scan using spoint10k_star_idx on spoint10k b (rows=1 width=16) (actual rows=1.33 loops=12) + Index Cond: ((star OPERATOR(public.<@) scircle(a.star, '0.01'::double precision)) AND (star <@ '<(1 , 1) , 0.1>'::scircle)) + Rows Removed by Index Recheck: 0 +(10 rows) + diff --git a/expected/moc100_1.out b/expected/moc100_1.out new file mode 100644 index 0000000..4cce1a4 --- /dev/null +++ b/expected/moc100_1.out @@ -0,0 +1,220 @@ +CREATE TABLE moc100 ( + ivoid text, + coverage smoc, + ref_system_name text +); +COPY moc100 FROM STDIN; +ANALYZE moc100; +CREATE INDEX ON moc100 USING GIN (coverage); +SELECT ivoid FROM moc100 WHERE coverage && '4/0' ORDER BY ivoid; + ivoid +------------------------------------------ + ivo://byu.arvo/dfbsspec/q/getssa + ivo://cadc.nrc.ca/archive/cfht + ivo://cadc.nrc.ca/archive/hst + ivo://cds.vizier/b/assocdata + ivo://cds.vizier/b/swift + ivo://cds.vizier/i/241 + ivo://cds.vizier/iv/12 + ivo://cds.vizier/ix/13 + ivo://cds.vizier/j/a+a/316/147 + ivo://cds.vizier/j/a+as/105/311 + ivo://cds.vizier/j/a+as/122/235 + ivo://chivo/gaia/q/dr1 + ivo://chivo/openngc/q/data + ivo://cxc.harvard.edu/csc + ivo://irsa.ipac/2mass/catalog/psc + ivo://irsa.ipac/2mass/catalog/xsc + ivo://irsa.ipac/2mass/images/asky-ql + ivo://irsa.ipac/cosmos/images + ivo://irsa.ipac/iras/images/issa + ivo://irsa.ipac/mast/scrapbook + ivo://irsa.ipac/spitzer/images/swire + ivo://mssl.ucl.ac.uk/xmmsuss_dsa/xmmsuss + ivo://ned.ipac/sia + ivo://ned.ipac/tap + ivo://svo.cab/cat/gbs + ivo://svo.cab/cat/uves + ivo://svo.cab/cat/xshooter + ivo://vopdc.iap/fss + ivo://vopdc.obspm/imcce/m4ast + ivo://vopdc.obspm/imcce/miriade + ivo://vopdc.obspm/imcce/skybot + ivo://vopdc.obspm/lesia/bestars/besc + ivo://vopdc.obspm/lesia/bestars/bess + ivo://vopdc.obspm/luth/exoplanet + ivo://vopdc.obspm/luth/hess +(35 rows) + +-- PG 10 does not have JIT, ignore errors on SET +DO $$ + begin + set jit = off; + exception + when undefined_object then null; + when others then raise; + end; +$$; +SELECT explain ($$SELECT * FROM moc100 WHERE coverage && '0/'$$); + explain +--------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=1 width=341) (actual rows=0.00 loops=1) + Recheck Cond: (coverage && '0/'::smoc) + -> Bitmap Index Scan on moc100_coverage_idx (rows=1 width=0) (actual rows=0.00 loops=1) + Index Cond: (coverage && '0/'::smoc) +(4 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage && '4/0'$$); + explain +-------------------------------------------------------------------- + Seq Scan on moc100 (rows=1 width=341) (actual rows=35.00 loops=1) + Filter: (coverage && '4/0'::smoc) + Rows Removed by Filter: 66 +(3 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage = '0/0-11'$$); + explain +-------------------------------------------------------------------- + Seq Scan on moc100 (rows=1 width=341) (actual rows=23.00 loops=1) + Filter: (coverage = '0/0-11'::smoc) + Rows Removed by Filter: 78 +(3 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage = '6/43225,43227'$$); + explain +------------------------------------------------------------------- + Seq Scan on moc100 (rows=1 width=341) (actual rows=1.00 loops=1) + Filter: (coverage = '6/43225 43227'::smoc) + Rows Removed by Filter: 100 +(3 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage = '0/'$$); + explain +------------------------------------------------------------------- + Seq Scan on moc100 (rows=1 width=341) (actual rows=1.00 loops=1) + Filter: (coverage = '0/'::smoc) + Rows Removed by Filter: 100 +(3 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage <> '0/0-11'$$); + explain +---------------------------------------------------------------------- + Seq Scan on moc100 (rows=100 width=341) (actual rows=78.00 loops=1) + Filter: (coverage <> '0/0-11'::smoc) + Rows Removed by Filter: 23 +(3 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage <> '6/43225,43227'$$); + explain +----------------------------------------------------------------------- + Seq Scan on moc100 (rows=100 width=341) (actual rows=100.00 loops=1) + Filter: (coverage <> '6/43225 43227'::smoc) + Rows Removed by Filter: 1 +(3 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage <> '0/'$$); + explain +----------------------------------------------------------------------- + Seq Scan on moc100 (rows=100 width=341) (actual rows=100.00 loops=1) + Filter: (coverage <> '0/'::smoc) + Rows Removed by Filter: 1 +(3 rows) + +SET enable_seqscan = off; +SELECT explain ($$SELECT * FROM moc100 WHERE coverage && '4/0'$$); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=1 width=341) (actual rows=35.00 loops=1) + Recheck Cond: (coverage && '4/0'::smoc) + Heap Blocks: exact=5 + -> Bitmap Index Scan on moc100_coverage_idx (rows=1 width=0) (actual rows=35.00 loops=1) + Index Cond: (coverage && '4/0'::smoc) +(5 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage <@ '4/0'$$); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=1 width=341) (actual rows=1.00 loops=1) + Recheck Cond: (coverage <@ '4/0'::smoc) + Rows Removed by Index Recheck: 35 + Heap Blocks: exact=5 + -> Bitmap Index Scan on moc100_coverage_idx (rows=1 width=0) (actual rows=36.00 loops=1) + Index Cond: (coverage <@ '4/0'::smoc) +(6 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage @> '4/0'$$); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=1 width=341) (actual rows=28.00 loops=1) + Recheck Cond: (coverage @> '4/0'::smoc) + Rows Removed by Index Recheck: 1 + Heap Blocks: exact=4 + -> Bitmap Index Scan on moc100_coverage_idx (rows=1 width=0) (actual rows=29.00 loops=1) + Index Cond: (coverage @> '4/0'::smoc) +(6 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage = '0/0-11'$$); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=1 width=341) (actual rows=23.00 loops=1) + Recheck Cond: (coverage = '0/0-11'::smoc) + Rows Removed by Index Recheck: 1 + Heap Blocks: exact=2 + -> Bitmap Index Scan on moc100_coverage_idx (rows=1 width=0) (actual rows=24.00 loops=1) + Index Cond: (coverage = '0/0-11'::smoc) +(6 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage = '6/43225,43227'$$); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=1 width=341) (actual rows=1.00 loops=1) + Recheck Cond: (coverage = '6/43225 43227'::smoc) + Rows Removed by Index Recheck: 28 + Heap Blocks: exact=3 + -> Bitmap Index Scan on moc100_coverage_idx (rows=1 width=0) (actual rows=29.00 loops=1) + Index Cond: (coverage = '6/43225 43227'::smoc) +(6 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage = '0/'$$); + explain +--------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=1 width=341) (actual rows=1.00 loops=1) + Recheck Cond: (coverage = '0/'::smoc) + Heap Blocks: exact=1 + -> Bitmap Index Scan on moc100_coverage_idx (rows=1 width=0) (actual rows=1.00 loops=1) + Index Cond: (coverage = '0/'::smoc) +(5 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage <> '0/0-11'$$); + explain +------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=100 width=341) (actual rows=78.00 loops=1) + Recheck Cond: (coverage <> '0/0-11'::smoc) + Rows Removed by Index Recheck: 23 + Heap Blocks: exact=5 + -> Bitmap Index Scan on moc100_coverage_idx (rows=100 width=0) (actual rows=101.00 loops=1) + Index Cond: (coverage <> '0/0-11'::smoc) +(6 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage <> '6/43225,43227'$$); + explain +------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=100 width=341) (actual rows=100.00 loops=1) + Recheck Cond: (coverage <> '6/43225 43227'::smoc) + Rows Removed by Index Recheck: 1 + Heap Blocks: exact=5 + -> Bitmap Index Scan on moc100_coverage_idx (rows=100 width=0) (actual rows=101.00 loops=1) + Index Cond: (coverage <> '6/43225 43227'::smoc) +(6 rows) + +SELECT explain ($$SELECT * FROM moc100 WHERE coverage <> '0/'$$); + explain +------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (rows=100 width=341) (actual rows=100.00 loops=1) + Recheck Cond: (coverage <> '0/'::smoc) + Rows Removed by Index Recheck: 1 + Heap Blocks: exact=5 + -> Bitmap Index Scan on moc100_coverage_idx (rows=100 width=0) (actual rows=101.00 loops=1) + Index Cond: (coverage <> '0/'::smoc) +(6 rows) + diff --git a/expected/moc1_1.out b/expected/moc1_1.out new file mode 100644 index 0000000..b014ab2 --- /dev/null +++ b/expected/moc1_1.out @@ -0,0 +1,120 @@ +CREATE TABLE moc1 ( + ivoid text, + coverage smoc, + ref_system_name text +); +INSERT INTO moc1 VALUES ( + 'ivo://cds.vizier/j/apjs/241/12', + '4/994,2432-2433 5/279,324-325,333,353,381-382,429,485,514,531,541,576,579,604,630-631,662,669,704,716,726,728,757,766-767,778,791,802,817,822,971,974,988,996,1003,1018,1032,1335,1417,1532,1653,1677,1701-1702,1712,1766,1933,1975,2007,2027,2034,2041,2128,2311,2369,2387,2389,2391,2398,2418,2428,2468,2482,2509,2514,2518-2519,2537,2547,2549,2551,2554,2557,2648,2849,2900,2907,2909-2910,2929,2931,2933-2935,2939,2941,2973,2977,2996,3001,3010,3029-3030,3067,3085-3086,3098,3102,3127,3140,3192,3205,3216,3247,3264,3270,3287,3306,3456,3490,3492,3544,3583,3608,3619,3625,3628,3631,3645,3647-3648,3651,3675,3680,3685-3686,3688,3693-3694,3696-3697,3699,3704,3706,3713,3724,3726,3731,3738,3741,3743,3749,3753,3758,3762,3771,3773,3776,3788,3791-3793,3798-3802,3805,3810,3813,3816,3818,3820-3822,3825-3826,3829-3831,3833-3836,3838-3839,3850,3881-3882,3919,3923,3929,3933,3939-3940,3942-3943,3948-3950,3956,3961,3963-3965,3967-3968,3971,3990,4002,4007,4010,4012-4014,4018-4022,4024,4026-4027,4029-4030,4032,4034,4041,4052,4055,4063,4068,4072-4073,4077,4084,4092,4110,4257,4437,4768,4776,4806,4828,5028,5116,5124,5135,5139,5189,5192,5194,5224,5239,5299,5315,5324,5333,5337,5370,5379,5384,5421,5467,5510,5512,5518,5552,5564,5577,5604,5620,5706,5715,5729,5740,5850,5900,5912,5915,5928,5938,5949,5954,6032,6156,6174,6216,6237,6314,6487,6522,6691,6831,6969,7152,7169,7185,7188,7190,7286,7352,7410,7423,7451,7484,7557,7559,7571,7588,7612,7625,7648,7694,7718,7768,7773,7797,7904,7940,7946,7950,8006,8019,8022,8061,8085,8156,8160,8190,8195,8207-8208,8210,8212-8213,8217,8222,8234,8244,8259-8260,8265,8269,8271-8272,8285,8287,8317-8318,8321,8330,8448-8449,8451-8453,8455-8456,8461,8471,8473,8475,8482,8496,8500,8503,8507,8520,8522,8531,8539,8546-8547,8549,8565,8576,8593,9045,9049,9123,9220,9232,9234,9246,9267-9268,9272,9275-9276,9294,9309-9310,9312,9315,9319,9322-9323,9330-9331,9349-9350,9352,9355-9356,9361-9362,9364,9377-9379,9387,9389-9390,9400-9401,9404,9423,9450,9452-9453,9466,9477-9478,9482,9484,9487,9494,9505,9512,9565,9736-9737,9741,9752-9753,9755,9757-9761,9764-9765,9767-9768,9770,9772,9776,9778,9789,9802,9823,9828,9837,9839,9851,9853,9856,9858,9861,9864,9869-9870,9884,9893-9894,9898,9921,9924-9925,9931,9935-9936,9945,9947,9963,9984,9992,9994,10011,10051,10071,10099,10122,10140,10156,10167,10204,10216,10248,10266,10310,10346,10349,10362-10363,10370,10402,10404,10412,10480,10509,10516,10570,10579,10587,10631,10650,10655,10681,10687,10777,10779,10782,10794,10826,10846,10863,10877,10883,10908,10920,10954,10987,11027,11037,11040,11057,11265,11285,11319,11341,11349,11352,11448,11461,11487,11505,11579,11605,11614,11686,11784,11795-11796,11833,11852,11882,11910,11922,11937,11946-11947,11958,12086,12099,12106,12255,12274 6/0,7-8,10-12,14,16,20,22,24,29,31,33,39,41,48-50,54,56-57,60,62,71,73,75,77,79,81,89,93,95,107-108,110,120,129-130,132,134,140,142,145,150,160,192,257,259-260,277,288,491,495,500,506,508-509,511,622,632-634,636,638,653,655,666,668-669,671,678-679,681-684,686,690-692,696-697,703,706,710,713-714,716-717,719-720,722,724-725,727-728,732-733,738,740-741,744,746,750-753,755,757-758,760,766,787,789,794,798,801-802,808,811-812,815-817,823,826-829,831-832,837,843,845-846,848-849,852-853,856,861-863,868,870,872,875,878,881,883-884,886,890,892,895-896,901-902,907-908,912,916-917,919,922,924,929,932,934,936-937,944,946,948,951,953-954,956,958,960,963,965-966,968,971,973,977,979,984,986-988,990,992-993,998-999,1001-1003,1005,1008-1010,1015,1021,1079,1084,1087,1102,1108,1112,1115,1122,1124,1127-1130,1134,1138-1140,1146,1148-1150,1162,1166-1167,1169,1171,1177-1178,1181-1184,1186,1190-1191,1208,1214,1216,1219,1221,1223-1224,1227,1229-1232,1237-1238,1241-1242,1244,1246-1248,1252,1258,1262-1263,1265-1266,1271,1274-1276,1280-1282,1286,1289-1290,1293,1309-1310,1312,1314-1318,1321,1323,1331,1336-1337,1339-1342,1344,1347,1349-1352,1354-1355,1358,1364,1366-1367,1369,1371,1375,1378,1381,1383,1387-1389,1391-1392,1394,1396-1397,1399,1401,1404-1405,1407,1416,1418-1420,1422,1424-1425,1428,1431,1436,1438,1440-1441,1443-1445,1447,1449,1452,1455,1457-1458,1463-1464,1466,1468,1470-1474,1476-1477,1479,1481-1482,1484,1486,1488-1489,1495-1496,1498,1500,1502,1507,1511-1512,1514-1515,1517-1518,1520,1523,1540,1542-1543,1545,1547,1549-1550,1552,1556,1564-1565,1568,1570-1571,1573,1575,1577-1578,1580-1582,1588,1591,1594,1597,1603,1606-1607,1610,1617,1620,1623,1625,1627-1629,1633,1637,1642,1646,1650,1654-1655,1662-1664,1668,1670,1673-1677,1679-1680,1682,1684-1685,1687,1689-1692,1694,1696-1697,1702-1703,1706-1709,1711-1712,1722-1723,1725,1729,1731,1735,1737-1740,1742,1752,1755-1757,1765,1768-1769,1773,1775,1778-1782,1784,1787-1790,1792,1794,1796,1801,1807-1809,1811,1817-1819,1822-1823,1825,1827,1829,1834-1838,1852,1855,1857,1859-1861,1863,1865,1870-1871,1874,1876,1880,1883,1885,1887-1888,1890-1892,1894,1897-1898,1903,1907-1908,1911,1914-1915,1918,1922,1925,1927-1929,1932,1934,1936,1939,1948,1950,1955,1958-1960,1963,1965,1968-1970,1973,1977,1980-1981,1983-1985,2002,2004-2006,2010-2012,2014-2015,2021,2027-2028,2034-2036,2038,2040,2042-2043,2052-2053,2060,2062,2064-2065,2073,2075-2076,2080-2082,2086,2088,2090,2093-2094,2100,2102,2105,2107-2108,2110,2113-2114,2116-2117,2120-2121,2128,2130-2131,2135,2137,2139-2140,2143,2151-2153,2160,2162-2163,2169-2172,2177,2183,2186,2191,2196,2201,2210-2211,2213,2215,2219,2226-2229,2231-2233,2235,2237,2239-2240,2243-2244,2246-2248,2253-2254,2256,2258-2260,2262,2264,2270,2274-2277,2279-2280,2282-2285,2289,2292-2294,2299-2302,2308-2309,2311,2313,2315,2320-2321,2324-2325,2327,2331,2333-2336,2339,2342,2344,2346-2347,2349-2352,2354,2356-2357,2360,2362,2364-2365,2368,2370-2371,2373,2375-2378,2381-2384,2386-2387,2389,2391,2393,2395-2397,2402-2403,2405-2407,2409,2411,2421-2424,2426-2430,2433-2438,2441,2443,2447,2449-2452,2454-2456,2459,2461-2462,2464-2465,2467-2470,2472,2476,2479-2480,2483-2484,2488-2489,2493-2494,2496,2498-2500,2502-2506,2508,2510-2512,2515,2517,2519,2528,2530,2532-2533,2535-2537,2540,2544-2545,2547-2548,2550-2551,2562-2563,2565-2567,2570,2572,2577-2581,2583-2586,2592,2594,2596,2601,2606-2607,2609,2611,2614,2616,2624,2626,2628-2630,2633-2636,2638,2641,2645-2647,2652,2658-2661,2663,2665-2668,2671,2673-2675,2680-2682,2685-2689,2691,2693,2698-2701,2703-2704,2706,2709-2711,2714,2716-2717,2720,2723,2732-2733,2735-2736,2738-2739,2742-2744,2747-2749,2751,2753-2756,2758,2766,2768-2769,2772,2776,2779-2780,2783-2784,2789,2792,2795,2797,2801-2802,2804-2805,2813,2815,2821-2823,2825-2827,2829,2832-2834,2837,2839,2841,2845,2847-2848,2852-2853,2856-2857,2860,2862,2869-2872,2874,2877,2879-2881,2885,2888,2890,2893-2894,2896,2900-2902,2908-2909,2919,2921-2923,2930,2938,2940,2946,2950,2955,2958,2960,2970,2974,2976-2977,2980,2984,2988,2995-2996,2998,3002,3004-3006,3014,3017,3020,3024-3025,3027,3032-3034,3036-3037,3039,3041-3044,3047,3049,3051-3054,3056-3058,3060-3061,3063,3072-3074,3076,3079,3081,3083-3085,3087-3088,3090,3092,3094-3095,3097,3102,3105-3106,3109-3110,3117-3122,3127,3129-3130,3132,3139,3142,3144,3146-3148,3154,3170,3174,3178,3183,3185,3191,3195-3197,3199,3201-3203,3218,3228,3230,3232,3234,3236,3238,3242-3243,3245-3246,3249,3255,3257-3258,3260-3262,3264,3266,3278,3280,3282,3286,3292-3293,3295-3296,3298-3299,3303-3304,3307-3310,3312,3314,3318-3319,3326-3328,3332,3336,3338-3341,3349,3351-3352,3354-3355,3360-3361,3366-3368,3370-3371,3374-3375,3377-3379,3381,3387,3389,3394,3396,3399,3405,3407-3408,3410-3411,3418,3431,3433,3435-3436,3440-3441,3443,3446-3449,3452-3453,3456-3457,3463-3465,3468-3470,3483-3484,3488,3490,3495-3497,3499-3502,3504-3505,3507,3510,3513-3514,3516,3518-3519,3522,3525,3527,3531,3533,3542,3549-3552,3554,3560,3565-3566,3568,3570-3571,3573,3577,3581-3583,3591,3595,3598,3601,3605-3606,3609,3617,3626,3636,3638,3641,3645-3647,3649,3653,3660,3662-3665,3667,3669-3670,3676,3679,3681,3684,3689,3697,3699,3702,3706-3707,3711-3713,3716,3718-3719,3721-3722,3724,3726-3727,3729-3732,3737-3738,3741-3743,3748-3749,3751,3754-3755,3757-3760,3762-3765,3768-3770,3772,3777-3781,3783-3785,3787,3790,3792,3795-3797,3800-3802,3804-3805,3807-3808,3810,3815-3816,3818,3820-3821,3827,3829-3831,3835-3837,3839,3841,3848,3851-3854,3859,3862-3863,3865,3867-3868,3870,3872-3874,3876-3877,3880-3881,3888,3892-3893,3895,3900,3905-3906,3909,3911,3913-3914,3916,3918,3920,3926,3929,3932,3942-3943,3945-3946,3949,3957,3962,3967-3969,3973-3974,3976,3980,3982-3983,3989,3991-3993,3995,3997-3998,4000,4003,4005,4009,4011,4017-4019,4022,4025,4028-4029,4031,4035-4036,4039-4040,4042-4044,4047-4048,4053-4054,4058,4060,4062,4064-4066,4068-4069,4077,4081-4082,4084,4086,4090-4093,4095-4097,4099,4101,4105,4107,4109-4110,4113-4114,4117,4119,4124,4126,4132,4135,4141-4144,4153,4157-4158,4160-4161,4164,4167,4169,4171-4172,4194,4198,4226-4227,4231,4234,4238-4239,4242,4253-4254,4264,4268-4270,4274,4280-4281,4290,4296,4429,4437-4438,4441,4452,4454,4461,4464-4465,4468,4470,4475,4479,4509,4535,4537-4539,4545-4546,4553,4558,4560,4568-4570,4572-4574,4577,4581-4583,4586,4590,4598,4600,4602,4609-4610,4612,4620,4622,4640-4641,4644,4830,4854-4855,4860,4880,4882-4886,4892,4895,4901,4903,4909,4914,4917,4920,4922,4925,4929,4932,4936-4937,4939-4940,4944,4962-4963,4965,4967,4983,4990,4994,4996,5002-5005,5008,5013,5015,5018,5026-5027,5036,5043-5044,5046,5048,5054,5065,5070,5072,5081,5088,5091-5092,5094,5098,5101-5102,5105,5108-5109,5115,5118-5119,5121,5123-5124,5132,5134,5137-5138,5141,5147-5148,5151-5152,5154-5156,5158,5163,5167,5170,5176,5180,5182,5186-5187,5189-5190,5194-5197,5201-5202,5204,5209-5210,5212-5214,5216-5217,5220-5221,5225-5226,5233-5235,5237,5241-5242,5245,5248,5251,5254,5257-5259,5262-5263,5265-5266,5277-5278,5280,5289,5294-5297,5299,5302-5304,5306,5310,5312-5313,5316-5318,5323,5325,5327,5330,5333-5334,5336,5338-5339,5345,5348,5353,5360,5366,5368-5369,5371-5372,5375,5378,5382,5387,5392,5394-5395,5398-5399,5406-5407,5415,5418,5423,5425,5429,5434,5438,5440,5442,5444-5445,5449,5455,5457-5458,5464,5467-5468,5474,5476,5478,5482,5484,5486,5490-5492,5494,5497-5498,5503-5505,5508,5515-5516,5520-5522,5527-5528,5531,5535,5541,5543,5545,5547,5549,5553-5556,5558,5562,5564,5568,5570,5572,5576,5578,5580-5582,5589,5591,5593,5602,5605,5610,5612,5615-5616,5618,5627,5629,5636,5639,5644,5649,5652-5653,5659,5675,5682-5683,5688-5689,5695,5699,5704-5706,5709,5711-5712,5718,5721,5724,5726-5727,5729,5731,5733,5736,5742,5748,5750,5753,5758-5759,5762-5763,5771,5774,5777,5783-5785,5792-5793,5796,5802,5805,5814-5815,5817-5818,5820,5823,5826,5828,5830,5833,5836,5839,5852-5853,5856,5859,5862,5864-5866,5871,5877,5880-5881,5885,5887,5891,5895,5904,5907,5909-5910,5919,5925,5927,5930,5946,5949-5950,5952,5954,5956,5959,5964,5973-5974,5983,5986-5987,5993-5995,6003,6007,6009,6015-6016,6019,6021,6023,6025-6026,6028,6034,6038,6047,6052,6056,6060-6061,6066,6071,6073,6080,6089,6094,6103,6106,6109,6115-6116,6119,6122,6124,6139,6204-6205,6207,6214,6224-6225,6227,6235,6237,6242-6245,6247,6249,6253,6261-6262,6266-6269,6287,6289-6290,6294-6295,6297-6299,6301-6302,6308,6311-6312,6315-6316,6318-6319,6321,6325-6326,6330-6331,6333-6335,6338-6339,6341-6342,6344-6345,6347-6348,6350-6351,6353-6355,6357,6360,6364,6368-6369,6371-6372,6375-6377,6382-6385,6387,6389-6390,6392-6393,6397,6403-6404,6406-6408,6410-6413,6417-6418,6421-6423,6425,6429-6430,6432-6433,6435-6438,6440,6443,6453,6456-6457,6461,6463,6471,6473,6477,6479-6480,6483,6491,6494,6498-6499,6503,6506,6508,6516,6521,6524,6526,6529,6533,6537,6539,6541,6543,6546,6549-6550,6553,6560,6562,6565,6568,6570,6572,6574,6578,6581-6582,6584-6586,6588,6590,6592-6593,6601,6603-6604,6608-6609,6616,6621,6625-6626,6628-6629,6635,6640,6643-6645,6647-6650,6655-6657,6660-6661,6665-6668,6670-6671,6674,6676,6678,6680-6681,6683-6686,6688,6690-6691,6693,6697,6703,6706,6712,6715,6718,6722,6724,6726-6729,6732,6735,6737,6739,6743,6745-6746,6748,6750,6753,6755,6757-6760,6762,6764,6766-6767,6771-6772,6779,6781-6783,6789,6791-6793,6797,6802,6813,6816,6818-6819,6821-6824,6826-6827,6830,6834,6839,6841-6842,6846-6847,6853,6857,6865,6869-6870,6872-6873,6875,6877,6881-6885,6887-6890,6892-6893,6895-6897,6906-6908,6910,6913,6921,6923,6926,6929-6930,6932-6933,6935,6938,6941,6944,6946,6948,6950-6951,6954-6955,6958,6960,6965,6968,6974,6979-6980,6987-6988,6992-6993,6997-6999,7001,7005,7007-7008,7011,7013,7015,7017-7018,7021-7022,7030-7031,7035-7037,7042-7045,7047,7049,7051-7052,7054-7057,7060,7062-7063,7071-7073,7075-7076,7078-7080,7082-7084,7089,7091-7092,7094,7096,7098-7099,7102,7106,7109-7110,7112-7114,7116-7117,7122-7123,7128,7130-7134,7136,7138,7140,7146,7148,7152,7155-7156,7159,7161,7163,7165,7167,7169,7178-7179,7184,7186,7188-7189,7191-7192,7194,7196,7198,7202,7205,7209,7211-7212,7214,7220-7221,7224,7228,7237-7238,7248,7253-7254,7256,7258,7262,7265-7268,7272,7274-7275,7282,7291-7292,7298-7299,7302,7305,7313-7315,7325,7330-7333,7335,7337,7339-7340,7342-7344,7348,7351,7355,7361-7363,7372,7374-7376,7380,7390,7392,7410-7411,7413,7424-7425,7429-7430,7433-7434,7436,7444,7449,7456,7458,7461-7462,7465-7466,7468,7472,7477,7492,7497,7500,7506-7508,7511,7515,7517,7523,7530,7537,7540,7544-7545,7550-7552,7558,7560,7563,7565,7568-7569,7573,7575-7577,7580-7581,7586,7589,7591-7593,7595,7598,7600-7601,7604,7606,7608,7610-7611,7613,7620-7621,7632-7634,7639,7642,7644-7645,7648,7651,7653-7654,7657,7659,7661-7665,7668-7669,7671-7672,7674-7675,7678,7681,7685,7690-7691,7693,7695-7696,7698-7700,7703-7704,7707-7708,7711-7712,7715,7717-7718,7720-7721,7723,7725,7739,7741,7746-7747,7750,7753-7754,7756-7757,7759-7761,7763-7764,7769,7777,7781-7782,7794,7796,7799,7802-7803,7807,7809,7813,7815,7817,7821,7824,7826-7828,7834-7836,7838-7839,7841-7842,7845,7847-7849,7851-7852,7855-7857,7880,7885,7887,7890,7894-7897,7905-7906,7908,7910-7911,7914,7916,7918-7919,7922-7923,7926,7933-7934,7938,7943,7949,7952,7954,7958,7960,7962,7964,7971,7974,7976-7977,7983-7985,7988-7990,7992,7994,8004,8006,8008,8013,8016-8017,8019-8020,8023,8025-8026,8033,8035-8036,8039-8040,8049,8054-8055,8058,8060,8062,8065,8067,8070-8073,8076-8077,8080,8087,8090,8093-8094,8101-8102,8112,8114-8117,8119-8122,8124-8126,8129,8131-8132,8134,8141-8142,8144-8145,8148,8150,8152-8154,8156,8158,8162,8170,8173,8176-8178,8183,8185-8186,8190-8192,8194-8195,8199-8200,8204,8206-8210,8212,8214-8215,8219,8222,8224-8225,8228,8230,8233,8237-8238,8241,8249,8251,8256-8257,8260,8266,8271,8274-8275,8277,8282,8287,8289,8292,8301-8302,8305,8311,8319-8320,8324,8327-8328,8330,8332,8337-8338,8340-8341,8344,8348,8350,8353-8354,8356-8358,8365-8366,8378,8384-8385,8392,8397,8399,8401,8403-8404,8406,8408,8410,8419-8421,8423,8425,8427,8429,8433,8438,8441,8453,8456,8458-8459,8461,8463-8465,8467,8472-8473,8476,8478,8481,8485-8487,8489-8490,8493,8498,8501,8504,8509,8519,8521,8524-8525,8530,8533,8543-8544,8546-8547,8549,8556,8561,8565,8567-8569,8571,8583,8585-8586,8588,8590-8593,8602-8603,8606,8622,8626,8631,8640,8645,8647,8652,8667,8669,8672,8674,8677,8679,8692,8701,8705-8708,8716-8717,8724-8725,8728-8729,8733,8735,8740,8743,8748,8750,8755,8757-8759,8761-8762,8764,8766,8777,8779-8781,8786,8792,8798,8802-8803,8811,8816,8827,8832,8837,8843,8845-8847,8852,8856,8860,8862,8890,8894-8896,8905,8917-8918,8923,8935-8938,8946-8948,8950,8959,8961,8965,8975,8985,8987-8988,8995,9000,9008-9009,9011,9015,9019,9021,9024,9032,9037,9044-9045,9055,9059,9061,9065,9071-9072,9077,9083,9089,9092,9097,9100,9102,9105,9111,9116-9117,9125,9127,9130,9133,9137,9139,9145,9155,9159,9162,9165-9166,9171,9177,9179-9181,9187-9189,9191,9198-9199,9206,9208-9209,9211-9212,9214,9218-9219,9221,9224-9225,9227,9229,9231,9233-9234,9241,9248,9253,9257,9259,9261,9264,9271,9274-9275,9277-9278,9283,9285-9286,9291-9294,9297-9298,9300-9301,9303-9304,9306,9308,9312,9317,9321,9323-9324,9327,9330-9332,9336,9343,9345,9348,9350-9352,9359,9361-9362,9365,9372,9377,9379,9381,9389,9393,9395-9396,9398,9400,9402-9403,9408-9409,9412,9415-9416,9425,9429-9430,9435,9440,9442-9443,9447-9448,9450,9459-9460,9463,9467-9468,9470-9471,9473,9480,9483,9485,9489-9490,9492,9494-9495,9497-9498,9501-9503,9510,9514,9519,9521-9524,9528,9532,9535-9536,9538-9542,9545-9546,9552-9553,9560,9571-9572,9578-9579,9581,9585,9589-9591,9599,9601-9602,9604,9607-9608,9610-9612,9615,9617-9619,9621,9623-9625,9628-9630,9634-9635,9637,9640,9642-9643,9646,9648,9651,9653,9656,9659-9662,9665-9667,9669-9671,9676,9680,9682,9684-9685,9687-9688,9690-9691,9693,9695,9698-9700,9702-9705,9707-9708,9710,9717,9719-9721,9724,9729-9730,9736,9744,9759,9762,9764-9765,9767,9769,9774,9776,9781,9787,9793,9795-9796,9799,9807-9810,9812-9813,9818,9820,9828,9830-9831,9833-9836,9839-9841,9849-9852,9854,9857-9858,9861,9863,9866,9869,9876,9882,9886,9891,9893,9895,9898-9899,9902-9903,9905,9910,9912-9913,9916,9918-9922,9925-9926,9933-9934,9940,9944,9948,9951,9954-9955,9963,9965,9967,9969-9970,9972-9974,9976-9977,9982,9984,9986,9994-9995,10000,10002,10005-10006,10012-10014,10016,10019-10021,10023-10024,10027-10028,10031-10034,10041-10044,10047,10049-10053,10055,10061,10063-10064,10068-10070,10080,10082-10085,10089-10094,10096-10097,10099-10102,10105,10108,10110-10112,10114-10116,10118,10120,10122-10123,10129,10132-10134,10138-10142,10145-10146,10154-10155,10157,10159-10160,10164-10165,10168,10170-10173,10175-10177,10179-10181,10183-10184,10187,10192,10194-10195,10200-10201,10203,10208-10209,10211,10213-10215,10220-10221,10223,10225,10227,10232-10234,10236-10238,10250,10254,10275,10277,10283,10285,10290,10292,10296-10297,10300,10302,10305,10310,10312,10314,10324,10330,10332,10336,10343,10346,10351,10354,10356,10361,10363-10365,10375,10379-10382,10384-10385,10391,10397,10399-10402,10407,10410,10412,10420,10425-10426,10429,10436,10440,10444-10445,10447-10449,10458,10470,10474,10477,10479,10481,10488,10496,10500,10502,10504,10511,10525-10526,10533,10540,10549,10551,10555-10556,10559,10562,10569,10573,10576,10581,10583,10585,10590,10596,10598-10599,10601,10608-10609,10612-10614,10620,10627,10634,10639,10643,10649,10657,10663-10664,10667,10672-10673,10678,10680,10683,10685-10686,10695,10702-10703,10710,10712-10713,10716-10717,10724-10725,10729,10735,10737,10740-10741,10744-10746,10749-10751,10762,10764,10766,10772-10773,10776,10780,10783,10789-10790,10792,10796,10812,10817,10820,10824,10826-10828,10832,10835,10839-10840,10849-10850,10853,10858-10859,10863,10872,10890,10897,10899-10900,10906-10907,10911,10920,10922-10924,10926,10930,10936,10938,10941,10948,10950,10955,10959,10962,10967,10970,10987,11000,11004,11006,11016,11018,11024,11026,11028,11040,11051,11057,11059-11060,11064,11070-11071,11078,11081-11083,11087,11089,11093,11102,11106,11119,11130,11134-11135,11137,11140,11146,11154,11162-11163,11170,11174,11176,11181,11186,11188,11194-11197,11204-11205,11207-11208,11218-11220,11223,11225,11231,11235,11258-11260,11263,11265-11266,11269-11270,11274,11276,11279-11280,11287,11290,11292-11293,11296-11297,11299,11301-11303,11306,11309,11311,11314-11315,11317,11319,11322-11323,11326-11328,11330-11332,11335,11338-11339,11341-11342,11345-11347,11354,11357,11359-11360,11362,11364,11367-11369,11376-11377,11381,11383,11385,11389,11391-11392,11394-11395,11402-11403,11409,11415,11419-11420,11425-11427,11430,11434-11435,11440,11449-11450,11454,11456-11457,11460,11465-11467,11470,11475,11478,11480-11481,11484,11488,11496-11497,11500,11502,11508,11513-11514,11517-11518,11521,11523,11525-11527,11530-11532,11534-11536,11540-11541,11543,11545-11548,11551,11554,11556,11561,11563,11572-11573,11576,11579,11581,11584-11585,11587-11590,11592-11594,11597,11604,11608,11611,11613-11616,11620,11624,11633-11635,11644,11652,11657-11658,11663,11669,11673,11676-11678,11691,11693,11696-11697,11699,11701-11704,11706,11708,11710-11713,11715,11720-11721,11723,11728-11729,11731,11745-11747,11749-11753,11755,11760-11761,11768-11770,11772-11774,11777,11780,11782,11789,11791,11794-11796,11798-11802,11804,11806-11807,11809,11811-11813,11816,11819,11821,11826,11829,11838-11839,11844-11846,11848,11853-11854,11856,11858-11862,11864,11870,11875,11877-11879,11885-11887,11889-11890,11897-11902,11906-11907,11912,11917,11920,11926-11927,11929-11930,11932-11933,11937-11939,11941,11945,11951,11953,11955,11958,11963-11964,11967,11970,11973,11975-11977,11979-11981,11989,11996,11998-12000,12008,12011,12014-12015,12017,12019-12021,12026,12031,12034-12035,12044-12045,12047,12049,12051-12052,12055,12057-12059,12062-12064,12066,12070,12074-12075,12080,12086,12089-12090,12092-12093,12095-12098,12100,12102-12103,12107-12110,12112,12114-12115,12124-12125,12129-12131,12135,12137-12139,12142-12144,12147-12148,12151-12153,12155-12158,12160,12162,12168,12171-12172,12175,12177,12181-12183,12185-12186,12189,12192,12197,12200-12201,12204-12205,12208,12214,12217-12221,12223,12226,12229-12232,12234,12236-12238,12242-12246,12253-12255,12257,12259-12260,12264,12266,12274-12275,12280,12282-12283,12285,12289,12294,12296,12299-12300,12303-12304,12309,12312-12314,12317-12318,12321,12323,12326,12329-12331,12335-12337,12339,12348-12349,12353,12359,12362-12363,12365,12368-12369,12377,12380,12384,12390-12391,12397,12399-12401,12404,12406,12412,12414-12415,12418-12419,12421,12423-12425,12427-12428,12434-12436,12439-12440,12442,12445,12449-12451,12453-12454,12456-12457,12460,12464-12466,12470-12471,12473,12476-12477,12481-12483,12487-12488,12492,12494-12495,12497-12498,12501,12503,12507,12512,12516-12518,12521,12523-12524,12526,12528-12529,12531,12533,12537,12539,12541,12545,12548,12550-12554,12556,12558,12564,12567,12569,12575,12578,12584,12586,12594-12595,12597-12599,12602-12603,12606-12608,12610,12613,12615-12616,12619-12620,12625-12627,12629,12634,12637,12639,12642,12644-12646,12649,12652-12654,12660-12661,12664,12666,12668-12670,12673,12675,12678-12682,12684,12686-12687,12690-12691,12693,12695,12697,12699,12701-12703,12705,12707,12709-12710,12713-12717,12721,12723-12725,12727,12729,12731-12732,12735,12740,12742-12743,12745,12754,12756,12759,12761-12764,12766,12773,12776,12778,12781,12784-12785,12787,12789,12792,12795-12796,12798,12800-12801,12803,12806,12808,12810,12812-12813,12815-12816,12824,12827-12828,12830,12832,12834,12837,12840-12841,12846,12848,12850,12853-12855,12860,12868,12872-12874,12878-12881,12883,12886-12887,12890-12893,12899-12900,12902-12903,12905,12907,12909-12914,12916,12918-12921,12923-12924,12926,12928-12930,12934-12935,12938-12939,12946,12948,12951,12954,12964,12968-12969,12973,12975-12977,12979,12981-12983,12992,12996,12999-13000,13008-13009,13013-13014,13018-13020,13023,13025-13027,13031-13032,13034,13036-13038,13041-13046,13049-13050,13052,13054,13061-13062,13065,13067-13070,13074,13078-13079,13085-13087,13090,13092,13094,13098-13101,13105-13107,13109-13111,13118-13120,13122,13126-13127,13129,13131,13134-13136,13138,13140-13141,13143,13145-13146,13153,13157-13158,13160-13162,13165-13166,13168-13170,13172-13173,13175,13177,13179,13181,13184,13187,13191,13196,13198-13200,13206,13208,13212-13213,13216-13218,13220,13223,13229,13235-13237,13243,13246,13248,13251,13257,13260,13264-13265,13267,13269-13270,13274-13276,13284,13286-13290,13297-13298,13300-13301,13303,13305,13308,13310-13314,13316,13319-13320,13324-13325,13328,13330-13331,13334,13338,13342,13345-13347,13350,13352-13353,13365,13372,13383,13386,13390,13405,13408,13417,13421,13423,13438-13440,13442-13443,13445,13447,13449-13450,13453,13455,13459,13465-13466,13469,13474-13475,13478-13479,13481,13483-13484,13486-13487,13495-13496,13498,13505,13508,13515,13517,13522,13526,13535,13538-13539,13541,13545,13550,13552,13554,13557-13558,13562,13565,13567,13571,13573,13576,13581,13583-13585,13590,13593,13598-13599,13602-13603,13605,13607-13608,13611,13614-13615,13620,13624-13626,13633-13634,13636,13639,13645,13647,13649,13652-13654,13658-13659,13661-13662,13667,13670,13672-13673,13675,13678,13680,13683,13688,13697-13698,13706,13710,13713,13715,13719,13722,13725,13727,13730,13736,13741-13743,13749-13750,13755,13762,13765,13768,13770,13773,13776,13785,13787,13794-13795,13799-13800,13805-13806,13808,13811,13814-13817,13823,13828,13832,13836,13840,13843,13849-13851,13853,13855,13857-13858,13862,13864,13870-13872,13877,13881,13883-13885,13887,13892,13895,13898,13904-13906,13910,13925-13927,13929-13930,13936,13942,13947,13953,13955,13958,13966-13967,13973-13976,13978,13984,13986-13988,13990-13991,13995,14003-14004,14006-14009,14013,14015-14016,14019-14020,14029-14031,14039-14041,14045,14052,14063,14073,14078,14086,14089,14092,14097,14104,14107,14109-14112,14118-14119,14122,14124-14125,14131,14134-14135,14138-14139,14141-14144,14146,14149,14151,14155,14159-14160,14162,14165-14166,14169,14172-14174,14180-14181,14183,14185-14187,14192,14194,14196,14198,14201,14203-14206,14213,14221,14227,14229-14231,14233-14234,14237,14239,14243-14245,14250,14254,14256,14259-14261,14263,14265-14268,14271-14272,14274-14275,14280,14282,14286-14287,14289,14292-14294,14297-14299,14301-14305,14308,14311,14316,14318,14320,14323,14329,14339,14346,14348-14349,14351,14353,14356,14358-14359,14361-14362,14367-14368,14370-14372,14375-14377,14379,14382-14385,14387,14390,14392-14393,14396,14400-14401,14403-14404,14406,14408-14409,14412,14416-14417,14419-14421,14427,14431,14437,14439-14440,14445-14450,14453-14457,14459,14461,14463-14464,14468-14470,14472,14475,14481-14483,14488,14491-14492,14494,14496-14497,14499,14504,14508,14516,14518,14521-14522,14528-14529,14531-14533,14535-14538,14542,14545-14547,14549-14554,14557-14560,14562,14565-14566,14568,14570,14572-14573,14576,14579,14585-14587,14596-14597,14599,14602,14608,14611-14612,14614,14617-14621,14624,14626-14630,14632,14634-14637,14639,14641-14642,14645,14648-14650,14652,14654-14655,14657,14662,14666-14668,14670,14674,14678,14682,14684-14685,14688-14690,14692,14694,14698-14699,14704,14706,14711,14714-14715,14718,14725-14728,14731,14734-14735,14739,14748-14750,14756-14757,14759-14760,14762-14763,14766-14768,14770,14780,14782,14793-14795,14800,14802,14806-14809,14812-14813,14815,14821-14822,14829-14833,14835,14837-14840,14842-14843,14845-14846,14849,14851,14856-14857,14859-14862,14865,14867,14871,14873,14875-14878,14883-14884,14887-14889,14893,14895,14901,14903,14909-14912,14915-14916,14918-14920,14922-14923,14928,14930-14931,14933,14935-14937,14939-14940,14942,14946-14948,14950-14951,14957-14959,14961-14963,14968-14970,14976-14977,14979-14982,14984-14986,14990,14992,14994,15001-15004,15007-15009,15011,15016,15019-15021,15023,15025-15030,15036,15039-15041,15044,15046-15047,15052,15054,15058-15059,15062,15064-15065,15068,15070-15073,15075-15078,15080,15082,15089,15091,15096,15098,15101-15103,15108,15110-15114,15117-15119,15121-15124,15126-15128,15130-15133,15135-15136,15138-15139,15141-15145,15147-15148,15151,15156-15158,15161-15162,15176-15178,15181-15183,15185-15187,15189,15212-15213,15215-15218,15225-15227,15230-15231,15233-15235,15237,15245-15246,15248-15250,15256,15258-15260,15263,15271,15276,15278-15279,15292-15293,15296,15298-15299,15309,15311-15312,15314-15315,15328-15330,15348-15349,15351,15360,15363-15364,15367,15369,15372,15374-15375,15378-15379,15383-15384,15387,15396-15397,15404,15407,15409,15411,15416-15418,15433-15434,15438,15445,15448,15450,15452,15457,15466,15468,15482-15483,15485-15487,15489,15492-15494,15496,15498,15500,15502-15506,15513-15514,15519-15522,15533-15536,15549,15551,15554-15555,15557,15560,15562-15563,15574-15575,15578,15585,15593-15595,15598,15600,15604,15606-15607,15614,15616-15617,15619-15620,15622,15630-15631,15633-15636,15638-15642,15646,15649,15652-15653,15659-15661,15665-15670,15672-15674,15683,15685,15687,15691,15698-15699,15705-15710,15713,15715,15720-15722,15726-15729,15731,15736-15738,15745,15747-15749,15751,15754-15755,15764,15766-15767,15777-15779,15781,15785-15786,15789,15805,15807-15808,15811-15812,15815-15817,15819,15821-15823,15829-15830,15833,15835-15836,15838-15839,15841,15848-15849,15851,15864-15866,15876-15878,15881-15883,15888,15890,15892,15894,15920,15923-15924,15931,15934,15936,15938-15940,15944,15950-15951,15954-15956,15958,15964,15971-15972,15975-15976,15979,15981-15982,15984-15986,15988-15990,15993-15994,15997-16000,16002-16006,16012-16013,16015-16017,16027,16032,16034-16035,16044,16046-16047,16060,16062-16063,16066-16067,16070,16092-16093,16095,16100-16102,16112-16114,16124,16132-16134,16141,16144,16148,16152-16154,16160,16162-16163,16168,16170-16173,16175,16177,16179-16180,16182-16183,16185,16188-16189,16191-16194,16200,16202,16205,16212,16214-16215,16217,16219,16224,16226-16227,16229,16232,16234-16237,16239,16241-16244,16247,16251,16256,16259-16261,16264-16266,16268,16270,16279-16281,16285-16287,16296,16298-16300,16302-16305,16307,16312,16314-16315,16317-16322,16324-16326,16331,16334-16335,16341-16342,16344,16346-16347,16349-16353,16356-16358,16361-16362,16365,16372,16376-16378,16380,16382-16383,16385-16386,16391-16392,16395-16396,16398-16399,16402,16410,16412,16414-16415,16417,16422-16423,16428,16433,16444,16446,16450,16452-16453,16459,16469,16475,16482,16484-16485,16494,16497,16511-16513,16516,16519-16520,16522,16524,16527,16531-16532,16536-16537,16544-16546,16548,16552-16554,16557,16560-16561,16565,16569-16570,16572,16574,16581-16582,16588,16592,16599,16601,16604,16606,16609-16611,16617-16619,16624,16626-16627,16629,16631,16634-16635,16639,16641,16644,16650,16665,16678-16682,16685,16695,16697-16698,16718-16719,16726,16749,16751-16752,16757,16763,16769,16771-16772,16776,16779,16781-16784,16788,16790-16792,16794,16797-16798,16801,16807,16810,16814,16818,16823-16824,16826,16830,16837,16842,16844,16849,16857,16859,16862-16863,16865,16871-16873,16880,16883,16891-16892,16897-16898,16904,16908,16917-16920,16922,16924-16926,16929-16930,16937,16940,16943,16945-16947,16949,16953,16955-16957,16960-16961,16964,16970-16973,16982,16987,16996,16998-16999,17003-17004,17011,17016,17018,17020,17023-17024,17035-17037,17045-17046,17051-17053,17056,17061-17062,17065-17066,17068,17072,17075,17079-17081,17083-17084,17089-17091,17095,17098-17099,17102,17106-17107,17114-17115,17121-17122,17130,17137,17144,17161,17163-17164,17171,17174,17177-17178,17184,17188,17193,17196-17198,17200-17201,17206,17208,17211-17212,17215,17217,17222-17223,17225,17229-17230,17237,17243,17248,17260,17270,17272,17276,17280,17290,17296-17297,17301,17316,17328,17349,17360,17410-17412,17417,17419,17421,17426-17427,17437,17439,17441,17443,17447,17451,17456,17458,17462,17465-17466,17468,17472,17477-17478,17482,17486-17487,17490-17492,17496,17502,17504-17506,17513,17518,17531,17533-17534,17543,17545,17551-17552,17555-17556,17576,17578-17579,17582-17584,17588-17589,17601,17605-17606,17611,17631,17635,17638,17640-17642,17645,17650,17654-17655,17657-17658,17664,17666-17667,17669,17671,17677,17679,17682,17686-17687,17689,17691-17692,17695,17698,17702-17704,17707-17708,17710,17720-17721,17723-17725,17730,17735,17737-17740,17743-17745,17752,17754,17759,17761,17768,17770,17773,17775,17780,17785,17790,17792-17793,17796-17797,17802,17804,17808,17810,17813,17817,17820,17822,17827,17832,17838-17840,17844,17847,17852,17859-17862,17864,17866,17869,17872,17878,17881,17883,17888-17890,17893,17895,17900,17909,17912-17913,17925,17928,17931-17933,17938,17944,17948,17953,17962-17965,17970,17991,17994,17996,17998,18002,18004-18006,18009,18017,18178-18179,18192-18193,18196,18413-18414,18421-18422,18425,18427-18428,18434-18436,18438,18441,18449-18450,18452-18453,18670,18679,18682,18685,18687,18843-18844,18847,18849,18851-18852,18856,18860,18862,18868,18870,18877,18887,18889,18891,18894,18898,18907,18909,18912,18914,18923-18924,18927-18928,18932,18957,18959,18963-18966,18973-18975,18985-18986,18988,18990-18992,18996,19001-19002,19006,19012,19016,19021-19022,19024-19025,19027,19030,19032,19034,19036,19041,19043,19048-19049,19053,19056,19059,19063,19070-19071,19079,19081,19084-19085,19090,19092-19093,19096,19100-19101,19111,19114-19115,19117,19120-19121,19123,19125,19129-19130,19133,19135,19137-19139,19144,19146,19148,19153,19155,19157-19158,19160,19162,19164-19166,19168,19172,19174-19175,19178-19179,19181,19184-19185,19188-19189,19193,19195,19200-19201,19203,19205,19213,19215-19216,19219-19220,19229-19230,19235-19237,19241,19244-19245,19250-19251,19256-19257,19260,19262,19268,19272,19275-19277,19282-19283,19288,19294-19295,19309-19310,19316-19317,19320,19322-19323,19332,19336-19337,19339-19342,19345,19348-19350,19354-19355,19357,19362-19363,19367-19368,19371-19372,19374,19376-19378,19380-19382,19385-19386,19388,19390-19393,19396-19397,19399-19401,19406-19407,19410-19413,19417,19419-19420,19431,19434-19435,19438-19439,19443,19445,19448,19451-19454,19497,19507,19511,19517,19547,19556,19563,19566-19567,19569-19570,19578,19585-19586,19589,19592,19596,19599-19600,19619,19622,19626,19634,19641,19661-19662,19673-19675,19687,19699-19700,19702-19703,19724,19726-19728,19733,19736,19741-19742,19745-19747,19750,19755,19759-19760,19764,19766-19767,19770,19777-19778,19785,19788,19791,19793,19796-19797,19799,19805-19808,19813,19816-19817,19820,19826,19830,19833,19837,19840,19842-19843,19847-19849,19851,19853-19854,19858-19859,19863,19867,19872-19873,19878,19881-19882,19899,19901,19905,19907-19908,19912-19914,19917,19919,19922-19924,19926-19927,19929,19933-19934,19942-19943,19945,19947,19950,19954,19957,19961-19962,19965,19976,19979-19980,19983,19985-19986,19989,19993-19994,19998,20005,20008-20009,20015,20022-20023,20025,20033,20039,20043,20047-20048,20054,20056,20059,20067,20078-20079,20082,20093-20094,20104,20108,20110,20118,20120,20124-20125,20128-20129,20134,20137,20140,20142,20145,20149,20152,20162,20186,20188,20190,20198-20200,20206,20212,20214,20219,20221,20223,20225,20228,20231-20234,20236-20237,20239,20242,20244,20253-20254,20257,20264,20268-20269,20273,20275,20279,20285-20286,20290-20291,20293-20296,20298-20300,20307-20309,20313,20319-20321,20323,20325,20330-20331,20335-20336,20338-20340,20342,20345,20347,20351,20358,20365,20370,20372-20373,20382,20386,20389,20391-20392,20397,20399-20400,20409,20413,20416,20418,20422-20424,20428,20431,20434,20440,20442,20445-20447,20449-20450,20454,20459,20461,20468-20469,20472,20476,20481-20486,20489,20495,20501,20505-20507,20509-20510,20512-20513,20516,20518,20522-20524,20528,20530,20534-20536,20546-20548,20550-20554,20561-20563,20570-20572,20574,20576,20579-20581,20583-20584,20586,20588-20589,20591,20593,20597,20601,20603-20605,20607-20608,20613-20614,20616-20617,20621-20622,20625-20627,20629,20631,20641,20643-20644,20646,20648,20650,20652,20657,20659,20661,20665-20666,20673-20674,20688,20690-20691,20693,20696,20701,20703,20711,20713,20716,20726-20727,20732,20735-20736,20742,20744,20746-20748,20750,20753,20755,20760,20764,20766-20767,20772,20775,20783,20786,20792-20793,20798,20802,20804-20805,20807,20816-20817,20819-20820,20823-20824,20826-20828,20831,20835,20838,20840,20842,20844,20849,20851,20856,20864,20867,20869,20872,20874,20880,20887,20891,20893-20894,20903,20912-20913,20915-20916,20920,20922,20926,20934,20939,20942,20947,20950,20953-20955,20960,20962-20963,20966,20975,20977-20978,20981-20984,20988-20989,20994-20995,20997,21001,21003,21005,21010,21019,21023,21025,21027-21029,21039,21046,21048,21055,21058,21060,21062,21073-21077,21080-21082,21086-21087,21089,21091,21094-21095,21097,21099,21101-21102,21106-21107,21109,21115,21118-21119,21121,21128,21131-21133,21141-21142,21144,21151,21153,21157,21159-21160,21162-21163,21165,21168,21170-21171,21174-21176,21179,21182,21185-21186,21190,21194,21200,21205-21206,21212-21214,21219,21221-21222,21225-21229,21232,21235,21240-21241,21246-21247,21250,21253,21256,21265-21266,21270,21275,21278-21279,21281-21283,21285-21286,21288-21289,21294-21295,21302,21311-21312,21314-21316,21319,21323,21325,21327-21329,21331,21338,21342,21344-21346,21352,21354,21357,21359,21361-21363,21366,21369-21371,21373-21375,21377,21379,21381,21384,21391,21393,21395-21396,21398,21400-21401,21403-21406,21409-21410,21413-21418,21420-21421,21424,21426,21430-21431,21434-21435,21438,21441,21443-21445,21447-21448,21451-21454,21458-21459,21461-21465,21469,21471,21476,21479,21489-21491,21494,21496-21498,21501-21503,21505,21507-21508,21510-21511,21513-21515,21520,21522,21524,21526,21531,21540,21542-21543,21547-21548,21552,21556,21559,21564,21566,21568-21569,21571,21574-21575,21577-21578,21580-21581,21587-21588,21591,21600,21603,21614-21615,21618,21620-21621,21623,21625-21627,21631,21634-21635,21637-21638,21641-21644,21646,21648,21650,21652-21654,21656-21657,21661-21665,21668,21670-21671,21673,21677,21681,21690,21693-21694,21696,21699-21700,21702,21704-21705,21708-21709,21712-21714,21717,21719,21721,21724-21725,21728-21729,21731-21732,21735-21737,21740,21743-21744,21746-21747,21749-21750,21752,21754-21756,21758-21761,21763,21765,21767,21769,21771-21772,21775-21778,21780-21781,21784-21785,21789-21790,21797,21803,21809,21811-21813,21815,21818,21825,21827-21830,21834-21836,21841,21843,21847-21848,21851-21852,21860,21863-21866,21872-21873,21875,21882,21884,21887,21890,21893-21894,21900,21904,21906,21908-21909,21920,21924,21929,21931,21937,21939,21941-21943,21952,21955,21957-21959,21961,21964,21969,21977-21978,21982,21987,21989-21991,21998,22006-22007,22010-22011,22014,22017-22022,22024,22026,22029,22031-22032,22035,22037,22039,22045-22047,22052,22054-22055,22057,22059,22062-22066,22069,22076-22077,22081,22083-22084,22088,22090,22093-22094,22098,22100,22105-22106,22110,22113-22114,22116,22118-22119,22121-22122,22125-22128,22131-22132,22134,22136-22138,22142,22145-22146,22148,22150-22153,22155-22157,22159-22162,22165-22168,22170,22172,22175-22178,22180,22182,22184-22185,22189-22190,22193,22197-22200,22202-22206,22214-22215,22217-22219,22221-22222,22224-22225,22231,22235-22236,22238-22240,22242-22245,22248-22249,22252-22253,22260,22262-22264,22268-22269,22271-22272,22278,22280,22285,22287,22289,22293-22294,22296,22300,22302-22303,22307,22312-22314,22316-22318,22323-22324,22326-22330,22332,22336,22339-22340,22346-22347,22349,22354-22355,22358,22367,22369-22374,22376,22381,22383,22385,22388,22391,22397,22400-22402,22404,22406,22409,22412,22415,22422-22423,22425,22427-22429,22432,22434-22436,22439-22442,22444,22446-22448,22452-22453,22455-22456,22458,22461,22463-22465,22470,22474,22476-22477,22479,22484,22486,22490,22498-22500,22502-22503,22505-22507,22510,22529-22530,22537,22542-22543,22546,22550,22558-22559,22576,22590-22591,22594,22601,22605-22606,22608-22609,22618,22625-22627,22636,22639-22642,22649-22651,22654-22655,22660,22662-22663,22665,22667,22669,22671,22678,22683,22685,22687,22689,22691,22696,22702,22704,22706-22707,22714,22716-22717,22722,22730-22731,22736,22741,22743,22746,22748,22755,22757-22758,22762,22773,22775,22778-22780,22785-22788,22793-22794,22796,22799-22800,22803,22807,22809-22810,22812-22813,22815-22816,22819-22820,22822-22823,22828-22829,22831,22834-22835,22838,22840-22842,22844-22845,22847-22849,22851,22854,22856-22858,22864,22867,22869,22874-22875,22878-22879,22882,22887-22888,22892,22894-22895,22900,22902-22903,22909,22915,22920-22922,22925-22929,22932-22933,22935,22937-22938,22941,22946-22949,22953-22955,22958,22965-22966,22969-22970,22972,22976-22977,22980,22982,22984,22986-22989,22991-22992,22995,22998-22999,23001-23004,23006,23008,23014,23017-23018,23021,23024,23027,23029-23030,23035-23037,23039,23041,23048,23052,23054,23061,23065-23066,23070,23073,23076-23077,23080-23081,23084,23086,23093-23095,23097,23099,23105-23106,23113,23118-23120,23124,23126,23129,23132,23139-23141,23145,23147,23150,23155,23159,23161,23165,23168,23172-23174,23182-23183,23190-23192,23198,23201,23203,23205,23213-23214,23221,23223,23226,23228,23236-23237,23242,23244,23247,23261,23268,23270-23271,23273,23275-23276,23278,23281-23283,23287,23294,23301,23304,23306,23310,23312-23314,23318,23321-23322,23325-23327,23331,23338-23339,23342,23344,23351,23356-23357,23360-23361,23365,23367,23369,23372,23375,23377-23379,23382-23383,23387,23389,23391,23393-23396,23398,23408,23410,23413-23414,23417-23418,23423-23425,23431,23435,23441,23443,23445-23446,23455,23463-23464,23469-23470,23472,23478-23479,23485-23487,23491,23494,23496,23500-23501,23503,23505-23506,23508,23511,23514-23515,23517-23518,23520,23522,23525-23526,23530,23536,23553,23555-23557,23562-23563,23572-23573,23575,23586,23588,23592-23593,23604,23606,23608,23613-23618,23620,23623,23625,23627,23629-23632,23635,23639-23640,23643-23644,23646-23647,23655-23656,23664-23666,23668,23670,23674-23675,23677-23682,23684,23686,23691-23694,23696-23698,23701,23705-23707,23709-23711,23716,23718,23720,23722,23726,23728,23731-23732,23734,23738,23740,23744,23746-23749,23751,23757-23759,23761,23765-23766,23768,23770-23771,23775,23780-23781,23784-23785,23789-23790,23792-23794,23800,23808,23812,23814,23820-23821,23824,23826-23827,23829-23832,23834,23837,23840-23841,23843,23847,23849,23852-23853,23855-23856,23858,23862,23865-23866,23873-23874,23936-23938,23940-23942,23945-23946,24064-24065,24067-24069,24071-24072,24075,24080,24083,24086,24089-24090,24093-24097,24099-24100,24102,24105,24108,24113,24120-24122,24133-24134,24138,24193,24196,24405,24409-24410,24412,24414-24415,24421,24423-24424,24428-24430,24432-24433,24438-24439,24442,24447,24467,24469,24476-24478,24484,24487,24490,24494-24495,24502-24503,24506,24508-24510,24512-24514,24516,24518-24519,24521,24523,24526,24528,24530,24532,24534-24536,24543,24545,24547-24548,24550-24553,24556,24558-24559,24562,24568-24570,24574-24576,24579,24582-24584,24587,24591,24594,24596,24602-24604,24612,24617-24618,24620,24628-24629,24633-24635,24638-24639,24642,24645,24650-24651,24653-24654,24656,24658,24661-24662,24666,24669,24675,24681,24685,24689-24690,24700-24701,24707-24708,24711,24714,24719,24721,24727,24730-24732,24735,24737,24742-24744,24747,24751,24754,24763,24768,24773-24774,24793,24795,24797-24798,24807,24810,24813,24815,24818,24820,24825-24826,24828,24834-24835,24838,24841-24842,24845,24847-24848,24852,24854,24869-24870,24872-24874,24886,24888-24890,24893,24895-24897,24900-24901,24904-24906,24908,24910,24913,24923-24925,24927,24929,24932,24934-24936,24938,24940,24942-24944,24946-24947,24953,24964,24974-24977,24981-24982,24986,24989,24991,24993,24995,25001,25006-25009,25011-25012,25020,25023-25025,25030,25034,25036,25039,25043,25050,25052,25056,25058,25063-25064,25068,25074,25078,25082,25091,25096,25098,25120,25123,25133,25135,25142-25143,25159,25163,25172,25174,25183-25184,25186,25193,25198,25203,25209-25211,25215-25218,25222,25227,25229,25231-25232,25235,25237,25241,25248,25250,25253-25255,25262-25264,25269,25271-25273,25278-25279,25285,25291,25295,25307,25309,25311,25314,25318,25321,25326,25328,25331,25334,25336,25339-25340,25348,25359-25360,25365,25370,25372-25373,25375,25377-25378,25384,25394,25397-25398,25401-25402,25404-25405,25410,25415,25442,25445-25447,25452-25454,25473,25475,25482,25490-25491,25499,25505,25513,25515,25518-25519,25523,25526,25528,25531,25534,25537-25539,25546,25548,25571,25600-25601,25604,25610,25634,25813,25844,25851,25853,25860,25869-25871,25874,25878-25879,25882,25892-25893,25896,25902,25907,25913-25914,25919,25924,25929,25931,25934,25940,25943-25944,25952,25954,25957,25962,25965,25971-25972,25974-25975,25980-25982,25985,25996,26000-26001,26003,26009,26014,26024,26030-26031,26033,26036,26050-26051,26053,26060-26061,26063,26066,26068-26069,26071,26077,26082,26084,26092,26095,26097-26098,26101,26106,26110,26191,26197,26200,26204,26221,26224,26227,26229-26231,26309-26311,26317,26325,26334,26337,26345-26347,26350-26351,26357,26364,26366,26371,26378,26386,26389-26391,26398,26402,26412,26416,26420,26423,26427,26437-26438,26440-26441,26443,26445,26449,26451,26455,26465,26468-26469,26471,26477,26480-26482,26486-26487,26489,26491-26494,26499,26501,26504,26510,26521,26526,26529,26532,26538,26543,26546,26575-26576,26581-26583,26586-26587,26589,26597,26599-26600,26604,26615,26617,26619,26627-26628,26630-26631,26638,26644-26645,26648,26651,26656-26657,26660,26668-26669,26671,26674-26676,26678-26679,26692,26696,26700-26701,26704,26707,26716,26718,26723,26727-26729,26734,26739,26742-26743,26745,26749,26753-26754,26758-26759,26769-26770,26773-26774,26778-26782,26784-26786,26788,26791-26793,26795-26797,26802-26803,26806,26810-26811,26813,26817,26821-26822,26832,26834,26839,26843-26844,26851,26854,26857-26858,26862,26864,26866,26870,26873,26876-26877,26891,26893,26898,26901,26912,26914,26921,26934,26938,27008-27009,27014,27019,27021-27022,27032,27040-27041,27043,27045,27047-27048,27056,27136-27137,27140,27143-27144,27150,27155,27159-27160,27165-27166,27170-27172,27176,27178-27179,27182,27185,27187,27192,27195-27197,27201-27202,27205,27207-27210,27214,27216,27219,27222,27224,27227,27233,27236-27237,27242-27243,27246-27247,27249,27251,27253,27255,27259,27262,27265,27267-27268,27270-27272,27279,27281,27286,27288,27290,27292-27294,27296,27298-27299,27301-27306,27312-27313,27315,27318-27321,27329,27332,27337,27345-27348,27350,27352-27353,27356,27361-27363,27365,27375,27378,27380,27384,27386,27396,27403,27424,27434,27605,27614-27615,27641-27643,27647,27670,27676,27678,27709,27714-27715,27720,27729,27732,27734,27737,27741,27749,27755,27764,27766,27775,27793,27796,27799,27802-27803,27807,27813-27814,27821-27824,27827,27833,27838,27842,27846,27850,27853,27856,27858,27861,27863,27865,27867,27874,27882-27886,27892,27895-27896,27898,27900,27902,27911,27915,27920,27922,27929,27931,27935,27937,27943-27944,27948,27951-27952,27955,27958-27960,27964,27967-27969,27973,27978,27980,27984-27985,27991-27992,28001,28008-28010,28013,28016-28017,28019,28021,28023,28025-28026,28030,28041,28046,28048,28052-28054,28059,28061,28063,28076,28078,28085,28089,28093,28111,28116,28129-28130,28136,28140,28146,28152-28153,28159,28164,28166,28172,28174,28177-28179,28187,28189-28191,28193-28194,28199,28202,28207-28208,28210,28212,28214-28215,28218,28223,28233-28234,28237,28241-28243,28247-28248,28252-28253,28255,28258,28269-28272,28278,28281,28285,28289,28291-28292,28294,28301,28306,28312-28313,28316,28321-28322,28330-28332,28336-28337,28341,28348-28350,28352,28360,28362,28372,28374,28378,28380-28381,28384,28386,28392-28393,28395,28397,28401,28405,28409,28411,28423,28425,28430,28433-28434,28439-28440,28448,28450-28451,28453,28457-28458,28470-28472,28478-28480,28482,28492,28494,28496-28497,28502,28504,28511,28513-28514,28517,28519,28531,28533,28538,28544-28545,28549,28555-28558,28560,28567-28570,28579-28580,28582,28585,28593-28595,28598,28601,28603,28605,28614,28618,28625,28630,28635,28643,28645,28647,28650,28652-28653,28657,28659,28666,28670,28672,28675,28684,28686,28688,28690,28692-28694,28697-28699,28701,28703,28706,28708,28710,28714-28716,28719,28725,28730-28733,28738,28744,28746-28747,28749,28759,28769-28770,28773-28774,28776,28800-28801,28803,28812-28813,28815-28816,28819,28824,28838,28841-28843,29051,29054-29055,29113-29114,29118,29127,29131,29135-29136,29142-29143,29148,29156-29157,29159,29163,29167-29168,29172,29174,29176,29178-29179,29184,29299,29301,29308-29309,29311,29372,29381,29387-29389,29393-29398,29400,29402,29406-29407,29413-29414,29416,29428,29430-29431,29434,29437,29439,29447,29449,29453,29457-29458,29461-29462,29464-29465,29471,29474,29476-29477,29479,29482-29483,29488-29489,29491-29492,29498-29501,29509-29510,29515-29516,29518,29520,29522,29525,29529,29536,29541,29548,29553-29554,29557,29561-29562,29564,29566,29568,29571,29577,29579-29580,29588,29592-29593,29598,29604,29606,29608-29609,29612,29616,29620-29621,29625,29630-29631,29633,29636,29638,29647,29656-29658,29661,29667,29670,29674,29678-29681,29684,29687-29688,29711,29715-29717,29720-29721,29723,29726-29730,29732-29733,29735,29737-29740,29747-29750,29753-29757,29759,29766,29769,29772,29774-29775,29784-29785,29788,29795-29796,29800-29801,29803,29810-29811,29814,29818,29823-29825,29829,29831,29833,29835,29837,29840,29846,29849-29850,29854,29857,29859,29861-29862,29869,29872,29874,29876-29877,29881-29883,29885,29887,29889,29894-29896,29898-29901,29903,29907,29911,29913,29919-29922,29926,29930,29932,29934-29935,29940,29943,29945-29946,29950,29953-29954,29958,29961,29963,29966,29968,29974,29977,29980,29982,29987,29992,29995-29996,30001,30007-30008,30014-30015,30017-30018,30024,30026,30036,30040,30042-30043,30048,30052-30054,30056-30057,30059,30063,30065,30067-30068,30072-30074,30081,30087,30089,30091,30099-30101,30107,30114,30123,30125,30128-30130,30137,30141-30142,30144,30150,30152,30154,30156,30159,30161,30164-30166,30170-30173,30175,30181,30183,30187,30189-30191,30193,30195,30197,30200,30204,30206-30209,30212,30216,30218,30220,30224,30233,30241-30242,30244,30247-30249,30253,30264,30270,30272-30274,30277-30278,30280,30289,30291,30293,30295-30297,30299-30301,30303,30305-30306,30308,30310,30312,30315,30318-30319,30321,30324,30326,30328-30330,30332,30334-30337,30342,30348-30349,30358-30359,30364-30365,30367,30369-30371,30373-30376,30378,30380-30381,30385-30386,30393-30394,30396,30402,30405-30407,30410-30413,30417,30421,30424-30425,30427,30429,30431,30434-30435,30437-30439,30442,30444-30445,30447,30453,30458-30459,30462,30466,30468-30469,30471,30473,30475-30476,30478-30479,30483,30485-30486,30488,30492-30493,30495,30497-30498,30504,30508,30510,30513,30515,30522,30529,30533,30535,30539,30542,30544,30548-30550,30552-30553,30557-30558,30561,30565,30568,30570-30571,30574,30576,30578-30579,30581-30582,30584,30586,30588,30590,30597,30604-30606,30608-30609,30611,30614,30616-30618,30621,30627,30631,30633,30636-30637,30641-30642,30646-30648,30650-30652,30661-30663,30665-30666,30668,30670,30672,30675,30679-30682,30691,30693,30699-30700,30702,30704-30705,30707-30708,30711,30714-30716,30719,30737,30742,30745,30747,30759,30762,30765,30770-30773,30780-30782,30784-30785,30788,30790,30795,30797,30802,30804-30806,30809,30825-30826,30829-30830,30833-30836,30838,30840-30842,30847-30848,30852-30853,30855,30863-30864,30866,30871,30878,30887,30896,30898,30901,30904,30906,30911,30915-30917,30924,30926,30928,30930,30933,30937-30938,30941,30943,30951-30952,30956-30958,30965-30966,30968,30974-30975,30980-30981,30987,30989,30993,30995,31001,31003,31005-31006,31008,31013,31015,31020,31026-31027,31031,31036-31038,31043,31047-31048,31058,31060,31062,31066,31071,31076,31078,31082-31083,31086,31098,31108-31109,31113-31115,31119,31122,31125,31133-31135,31138-31140,31142-31144,31149,31151,31153-31154,31157-31158,31160,31162-31163,31169-31172,31175,31177,31181,31183,31187,31195,31199-31200,31204-31205,31207-31208,31210-31211,31214,31216,31218,31220-31222,31224-31225,31228,31231,31237,31241,31250,31252-31253,31255,31258,31265,31268,31270,31272-31274,31277,31284,31287-31289,31293,31298-31301,31303,31309-31310,31317,31319,31322,31324-31325,31328,31337-31338,31342,31346,31349,31352,31354,31356,31364-31365,31369,31374,31380,31383,31387,31389-31392,31394-31396,31400,31405-31407,31409,31416,31418,31420,31430,31432,31437,31439,31450,31458,31461,31463,31472,31474,31476,31478,31480-31481,31486,31491-31492,31494,31499-31500,31504-31505,31510,31512-31513,31517-31518,31521,31524,31526,31528-31529,31532,31534-31536,31538-31539,31541,31553,31556-31557,31561-31565,31569,31575,31577,31579,31582,31584-31585,31589,31592,31594,31599-31601,31603,31608,31613,31615,31625,31629-31630,31633,31636-31637,31642-31644,31659-31660,31662,31666,31668,31670,31672,31675,31679,31685-31686,31693,31695,31698,31700-31701,31707,31710,31712,31724,31728,31730,31732-31733,31736,31739-31740,31742,31745-31746,31748-31749,31751,31753-31754,31756,31758,31765-31767,31769,31774,31777-31781,31788-31790,31794-31795,31798-31799,31804-31806,31811,31813-31816,31818,31820-31821,31823,31826-31827,31830,31832,31841,31843,31845,31850-31852,31857,31860-31862,31864-31865,31872-31874,31877,31879,31884-31886,31889-31890,31894-31895,31900-31901,31903-31904,31907,31909,31911,31915,31920,31923-31924,31926,31929,31932-31933,31936,31938-31940,31944-31946,31948-31949,31953,31955,31961-31962,31966-31970,31974-31975,31977,31979-31980,31984-31986,31989-31990,31994,31998-32000,32002-32005,32008-32009,32012-32014,32016-32018,32020,32022,32028,32033,32036,32038,32044,32049,32052,32056-32058,32060,32064-32065,32067-32068,32070,32072,32074-32075,32081,32083-32084,32086-32087,32093,32095,32100,32106-32107,32111-32113,32115-32117,32120,32122,32124-32125,32128-32129,32134-32138,32140-32141,32146-32147,32150,32152,32155,32158-32159,32161,32163-32164,32166,32171-32172,32175-32176,32179,32181,32192-32193,32196,32207-32208,32210,32212-32213,32216,32219-32222,32225,32227,32230-32231,32233,32239,32241-32242,32248,32251-32254,32256,32259-32260,32266,32270-32271,32273,32277-32280,32282-32285,32289,32291,32293-32297,32299-32300,32304,32306,32308-32310,32312-32314,32316-32317,32321-32323,32325,32328,32331-32334,32336,32347-32348,32355-32358,32372,32375,32378,32380,32382,32385-32386,32391,32396,32398,32403,32409,32411,32413,32419,32421-32422,32428-32429,32436,32438,32440-32441,32444,32446-32448,32450-32451,32453,32456,32459,32461,32463,32465-32466,32468,32470-32472,32475,32477,32484-32485,32488,32493,32495,32497,32499,32502,32505-32507,32512-32513,32515,32518,32520-32522,32533,32535-32536,32540,32547,32552,32555-32556,32559-32560,32564,32570-32572,32578,32580,32583,32586-32587,32589,32593-32594,32599,32601,32603,32607-32608,32610,32612,32617-32622,32630-32631,32633,32639,32644-32646,32650,32653-32655,32657-32658,32660,32666,32668,32670,32672,32676,32682-32686,32690,32694,32696,32700-32701,32703-32704,32708-32709,32711-32713,32715-32716,32718,32720-32721,32723,32726-32727,32730-32732,32735-32736,32738-32739,32741-32742,32746-32749,32753,32755-32756,32758-32759,32765-32766,32768,32770-32772,32774,32778,32785-32787,32790-32791,32793-32796,32798,32800,32802,32805-32806,32809-32813,32815-32816,32818,32821-32822,32824,32836-32837,32839,32844,32847,32857,32859,32862,32864,32867,32874-32876,32878,32880,32884,32886,32893-32894,32896,32898,32900-32901,32903,32905,32908,32910,32913-32915,32917,32919,32921-32924,32926-32927,32929-32930,32933-32935,32941,32945-32949,32951-32953,32955-32957,32960,32962-32963,32965-32968,32970-32971,32973-32974,32980-32981,32986,32988,32993,32995,32998-32999,33002-33003,33005-33006,33010,33013,33016,33021-33022,33025,33027-33028,33030-33031,33033-33034,33044-33045,33047-33048,33050,33053,33055,33057,33059,33064-33065,33067,33069,33072-33073,33082,33092-33093,33095-33097,33102,33105,33107,33119-33120,33122-33123,33129-33130,33137,33144,33147,33153-33154,33157,33160-33161,33166-33168,33172,33175-33176,33178,33184-33186,33188-33190,33192-33193,33195-33196,33198,33202,33211,33214-33216,33219,33224,33227-33228,33232,33236-33238,33240-33241,33243,33245-33249,33251,33257-33258,33264-33265,33267,33279,33281-33283,33291-33294,33298-33299,33301,33305-33306,33308,33310-33311,33318-33319,33329-33331,33333-33334,33336,33338,33340,33342,33347,33350-33351,33353-33354,33364,33366,33368,33371-33373,33378,33380,33384,33386-33387,33389-33390,33393-33394,33402,33404-33405,33409,33411,33415-33418,33421-33422,33424,33428,33432,33436,33442-33443,33447,33449-33452,33454-33455,33457-33459,33461,33465,33468-33470,33474-33475,33483,33486-33489,33492,33496,33498-33499,33507,33509,33514,33517-33519,33521,33525-33526,33531,33535,33537-33538,33540-33541,33545,33552,33554,33556-33557,33559,33561-33562,33564,33568,33572,33575-33576,33578,33581,33583-33584,33589-33590,33595,33598-33600,33604,33606,33616-33618,33620-33621,33623-33626,33631-33632,33639,33641,33643,33645,33648-33649,33653,33655-33657,33659,33663,33665-33667,33674,33677-33678,33682-33684,33689,33691,33694,33704,33710-33711,33715-33718,33720-33721,33724-33725,33731,33733,33741,33743-33744,33748,33755-33756,33758-33759,33762,33768,33774,33778,33780,33782-33783,33785,33787-33789,33803,33816-33818,33829,33831-33832,33834,33838-33839,33841-33843,33849,33852-33854,33856,33858,33860-33861,33863,33865-33866,33868,33871,33873-33876,33878-33880,33882,33889-33890,33896-33897,33899,33905,33907-33910,33912-33913,33915-33916,33918,33920,33922-33923,33925,33927,33932-33934,33937-33938,33941,33943-33944,33946-33949,33951-33952,33954-33957,33959-33960,33962,33964-33965,33968-33970,33972-33974,33976,33980,33983,33988,33995-33997,33999,34004,34006-34010,34017,34019-34021,34023,34026,34032,34036,34044,34048-34049,34051,34054,34057,34060,34062,34064,34066-34067,34069-34070,34073-34075,34077-34079,34084,34093-34094,34096,34101,34109-34110,34112-34114,34116-34118,34120-34121,34123,34128-34129,34131,34134-34135,34138,34140-34141,34145-34146,34148,34152,34154-34155,34160,34163-34164,34167,34174,34178-34179,34182,34195,34201,34203-34204,34206,34211,34213,34215,34217,34219,34221-34222,34225,34233,34238-34242,34245,34248,34251-34253,34255,34257,34265,34274,34279,34286,34288,34290-34291,34293-34294,34296,34300,34303,34308,34311,34315-34316,34321,34323,34325-34329,34331,34337,34340-34342,34345,34347-34348,34350,34352-34353,34356-34357,34359-34361,34369-34371,34376-34377,34380,34384,34386,34388-34390,34392,34398-34399,34403,34405-34410,34412-34413,34416,34426,34431,34435,34439-34440,34444,34450,34453-34455,34457,34460,34464,34467,34475,34484,34490,34495-34497,34499-34500,34502,34504,34514,34517,34519,34522,34526-34527,34532,34535-34537,34540-34541,34548,34553,34556,34558,34561-34562,34570-34572,34576-34577,34582-34583,34586,34589-34591,34594,34599-34600,34606,34617,34621-34623,34626,34630,34632,34636-34637,34641,34644-34645,34650,34652,34660-34661,34664-34665,34667,34669,34671,34685,34688-34689,34695-34696,34702-34703,34709,34711,34714,34718,34724-34725,34730,34732,34736,34739,34744-34745,34747-34748,34754-34755,34759,34764-34765,34768-34769,34774,34776,34779,34781,34784-34785,34790,34793-34794,34798,34812,34814,34817,34819,34822,34824-34825,34827-34828,34832,34835-34836,34839,34841,34845,34849,34851,34854,34856,34864,34866,34870-34872,34876,34888-34890,34899,34905,34907,34912,34914-34915,34923,34928,34936-34937,34941,34947,34953,34955,34959-34961,34968,34972,34976-34977,34979,34981,34985,34994,34997,35004,35010,35014,35022,35025-35026,35029,35032,35034,35036,35038,35044,35053,35064-35066,35070,35075-35076,35080-35081,35086,35093,35100-35101,35108,35123,35126,35128-35129,35133,35137,35152,35158-35159,35161-35162,35164,35166,35174,35180,35183-35184,35196,35204-35205,35209-35210,35212,35223,35228,35235,35237,35251,35257,35260,35262,35267,35282,35286,35302,35304,35311,35318,35327,35330-35331,35333,35338,35343,35346-35347,35350,35353-35354,35362-35363,35371,35373-35375,35378,35380-35381,35386,35389-35390,35392,35395,35399,35404,35417-35419,35422,35424,35429,35435,35442,35450,35454,35465,35471-35474,35479-35480,35482-35483,35490,35496,35498-35499,35502,35505,35507,35509,35515-35516,35519,35525-35526,35530-35531,35547-35548,35552-35554,35558,35566,35571,35576,35583-35585,35594,35596,35598-35600,35611,35626-35627,35634,35643,35645,35651,35655,35663-35664,35666-35667,35675,35681,35684,35686,35690,35694,35700,35706,35717,35723,35733-35734,35736,35740,35742,35749,35752,35769,35779,35787,35796-35797,35799-35800,35811,35820,35822,35826,35828,35833-35834,35838,35841,35844,35848,35851,35854,35856,35858,35860-35861,35863,35865,35869,35871-35872,35877,35882,35884,35891,35897,35902-35903,35908-35909,35912,35916-35918,35921,35923,35925-35928,35934,35941,35948-35949,35952,35954,35963-35966,35968,35971,35978,35981-35982,35990,35993-35994,35997,36006,36009,36013,36017,36028-36029,36034-36035,36042,36047,36049-36050,36052,36066,36072,36074-36075,36084,36087,36091,36094-36095,36097-36098,36106-36108,36112,36115,36120,36126,36133,36136,36142-36143,36145,36149,36151,36153,36164,36172,36177-36178,36185,36189,36192,36201,36209,36215,36219-36220,36222,36224,36226,36229,36232,36238,36242-36243,36253,36256,36263,36269,36274,36277,36280,36286,36288,36297,36305,36308,36311-36313,36321,36323,36326,36329-36330,36338,36341,36343,36345,36347,36352,36354-36355,36360,36366,36368,36374,36378-36380,36386,36389-36391,36394-36395,36398,36400-36401,36403-36404,36410,36418,36421-36422,36429,36445-36446,36448,36452-36454,36462,36465,36467-36468,36471,36476,36484,36487,36502,36516,36524-36526,36530,36541-36543,36545,36549,36552,36559-36562,36564-36565,36569-36570,36573-36574,36576,36586,36588,36595-36596,36600,36607-36609,36612,36621-36622,36634-36637,36641-36642,36648,36650,36652,36655,36660-36661,36663-36665,36670-36672,36677,36684,36687-36688,36690-36691,36693,36695,36698,36702,36707,36710-36711,36713,36715-36717,36720,36723,36725,36728,36735,36737,36739,36742,36745-36746,36756,36759-36760,36762,36769-36771,36773,36775-36778,36781,36783-36784,36786,36789-36793,36800,36802-36803,36805,36808,36812,36824,36828,36830,36832,36835-36837,36841-36842,36844,36847-36849,36851-36852,36855,36857,36859-36860,36863,36867,36869,36871-36872,36874,36876-36877,36879,36884,36886-36889,36891-36892,36894-36895,36897,36900-36901,36906,36908,36912,36915-36916,36918-36919,36922-36924,36932-36933,36940,36942,36947,36950-36951,36953,36955,36959,36964-36965,36970-36971,36979-36981,36983,36988,36990-36991,36993-36996,36998,37000-37001,37003,37005,37008-37010,37013,37017,37020,37022-37026,37029-37031,37033,37035,37037-37038,37040-37041,37043,37045,37047-37050,37055,37057-37058,37060,37063-37064,37067,37077-37082,37084-37086,37092,37094-37095,37097-37099,37110-37112,37116-37117,37119-37120,37123-37126,37128,37131-37132,37134-37135,37137-37142,37144-37146,37148,37150-37153,37155,37157-37160,37162-37165,37167-37170,37173,37175,37180-37181,37183-37184,37186-37188,37190-37191,37193,37195-37196,37200-37201,37203,37205-37207,37209,37211,37214-37218,37220-37221,37224,37226-37228,37230-37231,37234,37244-37246,37252-37254,37256,37265-37267,37270-37274,37280-37282,37284-37285,37287,37298-37300,37303-37306,37308,37312,37314-37316,37318-37319,37329-37331,37333,37336,37339-37340,37342-37345,37347,37349-37350,37352-37354,37357-37358,37360,37363-37366,37370-37371,37376-37377,37380,37382,37384,37386-37388,37390-37391,37394,37404-37405,37407,37412-37414,37416,37418-37419,37428-37430,37432,37434-37438,37440-37441,37443,37452,37455,37460-37461,37463,37465-37466,37468-37469,37473,37480,37483,37487-37488,37491,37494,37504-37505,37507,37520-37521,37523-37524,37528,37531,37535-37538,37544-37545,37547,37555,37565-37567,37569-37570,37572-37573,37575,37577,37583,37585,37587-37589,37591,37595-37596,37598-37599,37609-37613,37615,37622-37624,37628-37629,37631-37632,37637,37643,37645-37646,37653-37654,37657-37659,37661,37668,37673-37674,37680,37684,37697,37700-37701,37703-37704,37709-37710,37713-37714,37719,37724,37726,37728,37732,37735,37737,37744,37746,37748-37749,37754,37757,37759-37760,37762,37764-37765,37767-37768,37770-37774,37780,37786-37787,37789,37791-37794,37796-37798,37805-37806,37816-37817,37821-37823,37833-37836,37838,37841,37845,37848-37849,37851-37852,37854-37858,37860,37862-37863,37868,37872,37874-37875,37877,37882-37883,37885-37887,37891,37894-37895,37898-37900,37905,37907,37916,37918-37921,37924-37925,37927,37933,37940-37941,37945-37947,37955-37956,37958-37960,37964-37966,37970-37971,37974-37975,37981-37982,37985-37989,37991-37992,37995-37997,37999-38002,38005,38008-38009,38012-38013,38017,38025-38026,38029,38034-38036,38039-38040,38044-38045,38056,38059-38060,38062,38064-38065,38075-38077,38085,38087,38090,38095-38096,38100-38102,38104,38106,38114-38115,38119,38126-38127,38130,38132,38135-38136,38138,38140,38142,38144,38147,38149-38152,38155-38156,38158-38159,38164,38166,38168-38170,38174,38176-38178,38181-38182,38184-38185,38187-38188,38191,38195,38198,38200,38205-38206,38208-38210,38213,38215-38216,38219,38227-38230,38232,38237-38238,38246,38248,38250,38252,38269,38279-38281,38285-38286,38289-38290,38293,38295,38298,38300-38302,38307-38308,38311,38313,38316,38320,38327,38330,38334-38335,38337,38349,38355-38356,38360,38364,38370,38372,38378-38380,38384-38385,38390,38393-38395,38397,38406,38409-38411,38414,38420-38421,38428-38430,38432-38433,38436,38438-38439,38443-38444,38448-38449,38452-38454,38458,38460-38461,38465-38466,38472,38478,38480,38484,38486,38488-38489,38493-38494,38496,38503,38505,38510-38511,38517,38530,38535,38537,38542-38543,38549,38552-38553,38555-38556,38558-38560,38562,38566,38568,38570-38572,38575,38578,38581-38583,38585-38586,38589-38590,38592,38595,38597,38600,38602,38604-38606,38610,38614,38616,38618,38620-38621,38623,38625,38627,38629-38630,38633,38638-38640,38642,38647-38648,38652,38655-38656,38660,38662,38665,38671-38673,38685-38687,38689,38691,38698-38699,38701,38714,38717,38721-38722,38724,38726,38732-38734,38737-38738,38753-38754,38777-38778,38781,38785,38787-38788,38790,38801,38805-38806,38809-38812,38814,38816-38817,38819,38822,38826,38828-38830,38832,38834,38842-38844,38849,38851,38855,38858,38860,38871-38872,38879,38881,38885-38887,38893,38895,38897,38905-38907,38909-38911,38952,38954-38955,38957-38959,38962-38963,38968,38970,38972-38974,38977,38979-38981,38983,38985-38988,38990,38993-38997,38999-39000,39002-39004,39007,39017-39018,39025-39027,39048-39050,39052-39053,39055,39064-39065,39067,39076,39079,39085-39086,39093,39096,39099,39101-39103,39109-39111,39117-39120,39122-39123,39125,39129,39132,39135-39137,39139,39141-39144,39146,39148-39150,39154,39162-39163,39166,39169-39172,39174-39176,39180,39182-39184,39186-39187,39189-39192,39194-39195,39197-39198,39200-39202,39204,39206-39207,39212-39213,39215-39216,39218-39219,39221-39225,39227-39229,39231,39236-39238,39241-39244,39246-39247,39249,39253,39257,39266,39268-39270,39272,39274-39275,39277-39279,39281-39282,39284-39285,39288-39289,39291,39296,39299-39301,39303,39305-39306,39308,39310-39311,39321-39326,39329,39331,39333-39336,39338,39340-39342,39344,39346-39347,39353,39355,39367-39368,39370,39380-39381,39386-39388,39390,39392,39397-39398,39401,39403,39411,39418,39421,39428-39430,39438-39442,39448-39449,39453,39460,39464,39467-39469,39471-39472,39474,39484-39485,39488,39490-39491,39493,39496,39498-39500,39503,39505-39506,39509-39513,39516-39518,39521-39525,39528-39529,39531,39540,39542-39544,39546-39547,39550-39552,39554-39555,39557,39562,39564,39566,39568,39571,39580,39582-39583,39586-39590,39596,39598,39601-39602,39604-39605,39607-39608,39610,39612-39614,39619-39620,39622-39626,39628,39631-39632,39638,39641-39642,39644-39646,39648,39650,39652-39654,39660,39664,39666-39667,39669,39673,39675,39678-39680,39689-39690,39692-39693,39695,39705-39706,39708-39709,39711,39714,39716,39718,39721,39728,39730-39731,39736,39738-39739,39751,39755-39758,39762-39764,39766-39769,39771-39774,39776-39778,39786,39792-39793,39795,39801,39805-39806,39808,39810,39812-39814,39817-39818,39821-39822,39825-39826,39828,39830,39832,39834-39835,39837-39839,39841-39843,39846-39847,39851,39857,39861,39863-39864,39866-39867,39870-39871,39875,39878,39881,39888-39890,39892-39893,39896,39899-39901,39903,39905,39908-39909,39913-39914,39921,39923-39924,39926,39931,39933,39935,39940-39942,39944,39946-39947,39949-39950,39952,39955-39957,39959,39962-39963,39973-39974,39982,39985-39986,39988,39990-39992,39995-39996,39998,40008,40012,40016,40018-40020,40023-40024,40027-40028,40030,40036-40037,40039-40040,40042-40043,40049,40052,40054-40055,40058-40059,40063,40065,40067-40069,40071-40073,40075-40076,40078,40080,40086,40090,40096,40103-40105,40108,40111,40115,40119-40120,40122,40125,40127-40129,40131,40134,40137-40140,40143-40146,40148-40149,40152,40155,40157-40158,40164,40170,40172,40175-40176,40179,40183,40188,40193,40195,40197-40199,40201,40208,40213-40214,40219,40225,40228-40230,40235,40237,40239-40242,40245,40247,40249-40251,40255-40258,40264,40267-40269,40271,40274,40278,40280,40282-40283,40289,40292,40297-40299,40301-40302,40305,40310-40311,40313,40317-40318,40320,40322,40324-40325,40332,40334-40336,40338-40339,40341-40343,40345-40348,40350-40352,40358,40362,40368,40370-40373,40375,40377,40379,40381-40382,40386,40390-40392,40394-40395,40400,40403,40406,40411-40412,40414-40416,40418-40422,40424,40427,40429,40432-40433,40436,40438-40441,40445,40447,40455,40461,40464,40466,40469-40470,40472-40473,40475-40476,40479-40480,40483,40485-40487,40493,40496,40504-40506,40511-40512,40514-40517,40520,40522,40524,40526-40529,40534-40535,40538-40539,40544,40548-40550,40553,40555,40558,40564-40565,40567,40569,40573,40575-40576,40578,40580-40582,40585-40586,40588-40590,40592-40593,40596,40599-40600,40602-40603,40605-40606,40613-40615,40617,40619-40622,40631-40634,40637,40642-40643,40646,40648-40649,40653,40655,40658,40662-40664,40666-40667,40672,40674-40675,40679,40682,40690,40697-40702,40704-40705,40707-40709,40711-40713,40715-40716,40718-40719,40721,40729-40733,40735,40740,40742-40744,40746,40749-40752,40754-40758,40761,40764,40767,40770,40773,40779,40786-40787,40791,40798,40803-40806,40808-40809,40812,40814-40815,40823,40826-40827,40829,40831,40834-40836,40838,40841,40847-40849,40851,40854,40856,40862-40863,40868-40869,40875-40877,40879-40881,40883,40891,40893,40899,40909,40911,40914,40916,40919,40921-40923,40925,40928-40930,40933-40935,40937,40939-40941,40948-40950,40958,40962-40966,40968,40972,40976,40980-40982,40984-40985,40988-40989,40997-41001,41003-41004,41008-41010,41013,41016-41017,41019-41022,41025-41027,41029,41031,41033,41035-41036,41039,41042-41043,41046-41048,41053,41055-41057,41059-41060,41062-41063,41068,41070,41072,41074-41078,41081,41084,41089,41093,41097-41098,41100-41101,41104,41106-41107,41110,41113,41115,41117,41121,41125,41132,41135-41136,41138,41143-41145,41147,41150-41151,41153-41155,41157,41159-41161,41168,41170,41172,41175-41176,41178,41182-41183,41185,41188,41190-41192,41194-41196,41198,41200,41202-41204,41210,41214-41215,41217-41218,41221-41222,41225,41228,41230,41237,41239,41244-41245,41247-41248,41251-41252,41254-41258,41260-41262,41265,41267,41272,41275-41277,41279,41283,41287,41289-41290,41292-41293,41295,41298,41303,41306,41308,41311,41315-41316,41319,41326,41328-41330,41334-41335,41337-41338,41340-41342,41345,41347,41351-41353,41355-41356,41358,41360,41362-41364,41366,41369-41370,41373,41376,41378-41379,41381,41383,41388,41390-41391,41394,41400,41405,41407,41411-41412,41415-41418,41420,41425,41428-41429,41432,41434-41438,41441,41444,41446-41447,41456,41459,41461,41463-41464,41467-41468,41472,41474,41477-41479,41485,41487-41488,41490,41492,41495-41498,41500-41502,41504,41509-41511,41515,41517,41519,41521,41523-41526,41528-41530,41532-41533,41538,41541,41543,41545,41547-41548,41550,41552-41553,41559,41562,41565,41567,41570-41572,41575-41577,41581-41582,41587,41592,41594,41596-41598,41600,41602-41604,41607,41613-41614,41620-41622,41625,41627,41629-41634,41637,41642,41645,41654,41656,41658,41660,41664-41666,41671-41673,41677-41678,41682,41684,41686-41688,41690-41691,41695-41696,41698,41703,41708,41710,41712,41719-41720,41724,41733,41735,41737-41739,41743,41745,41750-41751,41753,41755,41761-41765,41769,41774-41776,41781-41782,41784,41786,41788-41790,41793,41795,41799,41803,41806,41808,41811,41814-41815,41817-41819,41821,41824,41827-41828,41830-41831,41835,41837,41839-41840,41843,41846,41852-41853,41858-41859,41864,41867,41873,41875,41877-41882,41890,41901,41903,41907-41910,41913-41914,41917,41919,41925,41928-41929,41935-41936,41939,41941-41942,41944,41946-41947,41949,41954,41960,41963,41965-41968,41972-41973,41977-41979,41982,41984,41987-41988,41990,41994,41996-41998,42003,42005-42010,42014,42016-42017,42019-42022,42026-42027,42032,42034-42035,42041,42043-42044,42049,42051,42053-42054,42057-42058,42060-42061,42063,42068,42070-42072,42075-42076,42078-42079,42083,42085,42087,42089,42091-42093,42095,42097,42099-42101,42103-42104,42106,42109,42113-42115,42117,42120-42121,42124,42127-42128,42132,42134-42137,42140,42142,42145,42147,42150-42151,42153-42154,42156-42157,42160,42163,42165,42168-42169,42172,42174,42179-42180,42186,42198-42199,42201,42203,42205,42207,42213-42214,42220,42226-42227,42232,42237,42239,42245-42246,42248,42250,42252-42254,42256,42258-42262,42264-42266,42271,42274-42275,42279,42284,42287,42290-42292,42294-42295,42297,42299-42300,42303-42304,42306,42308-42309,42311-42312,42314-42315,42323-42324,42326,42329,42331-42332,42334,42338-42339,42341-42343,42346-42347,42352-42354,42358-42360,42362,42364-42366,42368-42370,42374-42375,42378,42380,42382-42383,42385-42386,42389,42393-42395,42403-42405,42409,42413-42415,42417-42419,42423,42431-42433,42437-42438,42440,42442,42444,42456-42458,42460,42463-42464,42467,42469-42470,42480-42481,42483,42486,42493,42495,42501-42502,42509,42512,42515,42522,42529,42531,42538-42539,42541-42542,42545,42548,42550-42551,42553-42557,42560-42561,42563,42569,42571,42577,42579-42580,42582-42584,42594-42597,42604,42607,42610,42612-42613,42617,42624,42631,42633,42635,42638,42640,42642,42644,42646,42649-42650,42658,42660-42661,42663-42666,42668,42671-42672,42674,42676-42678,42682-42683,42686-42688,42692,42700-42701,42706,42708-42709,42714-42716,42718,42722-42723,42736,42745-42747,42752,42757-42758,42769-42770,42775-42777,42779,42787-42788,42790-42792,42794,42797,42803-42806,42808,42810-42812,42814-42815,42820-42821,42823-42824,42827-42828,42830-42833,42836,42839,42844,42853,42855,42857-42858,42860-42862,42864,42881,42885,42887,42891,42893,42897,42899,42901-42903,42905,42907-42908,42912-42913,42916,42927,42929,42931,42937-42939,43010-43011,43017,43021,43023-43024,43027,43033-43035,43040-43041,43043,43048,43052,43055,43057-43058,43060,43064,43066,43072,43074-43075,43077-43078,43080,43082,43085,43087,43089-43090,43092-43093,43098-43101,43103-43104,43107,43113-43115,43120,43126-43127,43135-43137,43143,43145,43148,43150,43156,43161,43163,43168,43171,43180-43181,43189,43191,43193-43195,43198,43201,43204,43206,43208,43210-43212,43215,43217-43218,43220,43222-43223,43227-43229,43231-43232,43234-43236,43239,43241-43242,43245-43248,43250-43254,43256,43258,43260,43266-43267,43269-43271,43273-43275,43277,43282,43284-43285,43287,43290,43293-43295,43299,43302,43309,43311-43313,43316-43317,43320-43322,43325,43327-43330,43336,43340,43347-43348,43351-43352,43354-43356,43358-43361,43363-43364,43366,43368,43370-43371,43377-43380,43383,43388-43389,43391-43392,43394-43395,43401,43403,43405-43407,43409-43411,43413-43414,43416-43418,43422-43423,43426,43429,43431,43435,43440-43442,43446-43449,43459,43463,43467-43469,43472-43473,43475,43477-43480,43483-43484,43487-43488,43491,43495-43496,43498-43499,43501,43503,43505-43506,43512-43513,43515,43518,43522,43525,43529,43536-43537,43540,43544,43546,43549-43551,43553,43555-43558,43561,43563,43565,43567-43568,43570-43571,43577,43582-43583,43585,43588-43589,43591,43593,43595-43596,43599-43600,43604-43605,43608-43609,43611-43612,43614,43616-43618,43620,43623-43624,43629-43631,43636-43637,43639-43641,43644-43646,43648,43654,43657,43659,43663,43667,43670-43673,43675,43684,43688,43691,43697,43700,43702,43708-43709,43711,43713,43715-43718,43721-43722,43724-43726,43730-43732,43735-43736,43739,43741,43746,43749-43751,43753,43759-43760,43770,43772-43773,43775,43777-43778,43780,43782-43784,43786,43788,43790,43794,43796-43798,43801,43805,43808,43813,43815,43821,43826,43829,43831,43833-43834,43837-43839,43841-43843,43846-43848,43850-43852,43854-43857,43860-43861,43868,43870,43873-43874,43877,43879-43882,43884-43885,43887,43889-43890,43892,43897,43900,43903,43905,43909,43911-43914,43916-43917,43919-43920,43922-43923,43930,43935,43940,43943-43944,43946,43954-43955,43957,43960,43963,43966,43969-43970,43977-43978,43981,43983,43989,43991,43993-43998,44000-44001,44003-44004,44006-44007,44012-44013,44016,44019,44021,44026-44027,44037-44040,44043-44044,44046-44049,44051-44052,44056-44058,44060,44062,44064-44066,44069,44071,44075-44077,44079,44082-44085,44088,44090,44092-44093,44095-44098,44102,44105,44113,44116-44117,44122-44124,44126,44128,44131-44133,44136,44138-44140,44142,44147,44152,44154-44155,44157,44159,44164,44169-44171,44174,44176,44179-44180,44184,44186,44188-44189,44192,44194-44195,44199,44201-44202,44204-44205,44207-44208,44210,44212,44214,44218,44220-44221,44224-44225,44233,44235,44243-44244,44246,44248-44249,44251-44252,44258,44264,44267,44272,44274,44290-44291,44293,44296,44298-44299,44304,44323,44328,44330,44501-44503,44507-44508,44527,44530-44532,44535,44542-44543,44548,44550,44555-44556,44558,44562,44565,44567,44571-44573,44575-44577,44580,44585-44587,44591-44592,44595,44603,44606,44609,44611,44613-44614,44616-44618,44672,44674,44678-44679,44681,44684,44687,44705-44706,44708-44709,44717,44720,44862,44871,44879,44882-44883,44885,44887,44900,44902,44905,44909,44913,44915,44919,44921,44923,44925,44927,44950,44955-44956,44958,44976-44977,44983,44993,44999,45001-45003,45008-45010,45014,45017,45021-45022,45029,45031-45032,45037,45040,45042-45043,45045,45054-45055,45065-45066,45069-45071,45074-45075,45077-45079,45081-45082,45085-45086,45088-45089,45091-45092,45094,45096-45097,45100,45105-45106,45108,45111-45113,45116,45119,45122,45124-45125,45127,45129,45132,45135-45137,45144,45146-45147,45149,45154,45157,45159,45166,45168,45170-45171,45175-45176,45181-45185,45188-45190,45192,45194,45198,45205,45207,45209-45210,45213-45214,45217-45218,45220-45222,45226,45228,45231,45239-45240,45242,45245-45246,45249-45250,45252,45254-45258,45261,45263-45264,45270,45272-45273,45283,45286-45287,45289,45294,45296-45297,45299,45301-45302,45304,45306-45307,45309-45310,45312-45314,45318-45319,45321-45322,45332-45333,45337-45338,45343-45344,45348,45353,45359-45360,45362,45369,45372,45377-45379,45381-45382,45384,45394,45403,45405-45406,45419,45423,45427,45429-45432,45434-45436,45439,45443-45445,45447,45450-45451,45457-45458,45460-45462,45466,45472-45474,45477,45483,45485,45489-45491,45493-45496,45499,45501-45502,45504,45506,45509-45510,45513-45516,45520,45523,45525,45528,45530,45535,45537-45538,45541-45543,45548-45549,45552,45554,45556,45558,45565-45566,45570-45571,45573,45575,45578-45579,45585,45589,45593,45596,45598,45602-45605,45617-45618,45620,45624,45627,45632,45634,45647,45649-45651,45653,45656-45658,45662,45665,45669,45673,45676,45678-45680,45682,45684-45685,45689-45690,45696-45697,45699,45701-45702,45704,45710-45711,45713,45715,45723-45724,45726,45730,45738,45740,45742,45744,45750,45752,45756-45758,45760,45765,45767,45771-45774,45776,45783,45786,45796,45802,45804,45807,45810,45812-45813,45815,45820-45821,45823,45826,45829,45836,45839-45840,45842-45843,45851-45854,45856,45858,45863,45865,45870,45878-45879,45885,45888,45893,45895-45896,45904,45914-45916,45923-45926,45931,45933-45935,45937,45941-45942,45944,45946-45947,45952,45956,45962,45966-45968,45976,45978-45979,45981-45983,45985-45988,45990-45991,45996-45997,45999,46007-46009,46016-46018,46024-46026,46028-46029,46031-46032,46036,46038,46040-46041,46044,46049,46060,46062-46066,46068,46072,46074,46076-46077,46080,46082-46083,46089,46092,46094-46095,46097-46098,46100-46101,46103-46105,46107,46112-46113,46115,46119-46120,46123,46126,46131,46137,46139,46142-46143,46145,46155,46158,46170,46172-46173,46178,46182,46184,46190-46191,46193,46195,46197,46199,46203,46208-46209,46213,46217,46225,46230,46235,46238-46239,46246,46248,46250,46252-46253,46258,46264-46265,46270,46277,46287,46289,46291,46295,46297,46300-46301,46304-46306,46312,46320,46322,46324,46333,46335,46337,46351,46353,46355,46357,46373,46376,46385-46386,46393-46395,46398-46400,46406,46409,46411-46412,46418,46425-46426,46430,46438,46442,46445-46446,46450-46453,46460,46463,46466-46468,46470-46471,46473,46479-46481,46484,46488,46490,46494,46499,46502,46506-46507,46509-46513,46523,46525-46527,46529-46530,46535-46536,46541,46545-46546,46550,46554,46566,46568,46571-46573,46578,46583,46590,46593-46594,46606,46610,46612-46614,46619,46621,46625,46627-46628,46630,46635,46638-46640,46654-46655,46658,46661,46666-46668,46672,46677-46680,46683,46687-46688,46690,46695,46697,46699,46702-46704,46706-46708,46711,46713-46714,46717-46719,46721,46723,46726-46727,46730,46733,46749,46756,46763,46765,46767,46769,46771,46773,46775,46778,46784,46789-46791,46794,46809,46818,46820-46821,46829,46833,46840-46841,46844,46846,46849,46852,46854,46858,46866,46869,46874-46875,46877,46883,46889-46891,46893,46895,46899-46902,46904,46907,46910-46911,46913,46919,46921,46930,46934,46937,46943,46945,46958-46959,46964,46967-46968,46970,46975,46977,46982-46983,46988,46991,46994,47002,47004,47008,47010-47011,47013,47018-47019,47021-47023,47026-47027,47031,47034-47035,47037,47040,47046,47049,47052,47055,47058-47062,47068-47069,47071,47074,47079,47083,47086-47087,47091,47093-47094,47096-47097,47101,47105,47107,47109,47112,47114,47116,47118-47119,47122,47127,47129,47134,47143-47145,47147,47149-47151,47153,47156-47157,47159,47163,47165-47167,47174-47178,47190-47191,47195,47197-47198,47201-47203,47207-47208,47212-47213,47219-47220,47223,47231,47233-47235,47237-47238,47244-47246,47250,47253,47257-47259,47261,47263,47265-47266,47268,47270,47273-47274,47278,47280,47284,47290-47291,47293-47296,47300-47302,47307,47309,47311,47313,47315-47318,47322,47336,47339-47340,47342,47351-47352,47359-47361,47367-47368,47374-47375,47377,47379-47381,47383,47385-47387,47389,47391-47392,47396,47399,47402,47404,47407,47412-47413,47415-47417,47419,47423-47424,47426,47430,47440,47444,47449,47451,47454,47457-47458,47460-47461,47464-47465,47468-47469,47472,47475-47476,47478-47479,47483,47487,47495,47501-47504,47506,47511,47513,47515,47517,47519,47527,47532,47534,47540-47541,47543-47544,47546,47549-47550,47553,47555-47556,47559,47561,47565-47566,47568,47570-47571,47575,47577,47579,47582,47584,47586-47588,47590,47592,47595-47596,47598,47600,47603,47605,47609,47617,47620-47622,47625-47626,47630,47632-47633,47638-47639,47644,47648,47650-47651,47653-47654,47657-47660,47663,47666,47668,47670,47672,47676,47678,47680-47681,47687,47693,47696-47698,47702-47705,47707,47709-47710,47713,47715-47717,47719-47720,47722,47726-47728,47734,47739,47742-47745,47747,47753,47757-47761,47766,47768-47769,47771,47773-47775,47780,47783,47792,47794,47796-47798,47801,47803-47804,47806,47810-47811,47817-47820,47825-47826,47829-47831,47839-47840,47842-47844,47846-47847,47852,47855,47858-47860,47864-47866,47868,47870-47872,47874-47875,47879-47881,47883-47886,47889,47894,47897-47899,47904-47905,47909-47911,47915-47916,47919-47920,47922,47924-47926,47930,47932,47935,47940,47949,47953,47958,47960-47961,47964-47965,47969,47973,47978-47982,47986,48000-48001,48003-48004,48006-48007,48009-48013,48018,48020,48022,48025-48026,48031,48035-48036,48039-48040,48043-48044,48049,48064-48065,48128,48133-48134,48138,48140-48141,48143,48145-48146,48148,48156-48157,48163-48164,48166,48169-48170,48178-48179,48182,48188-48189,48193,48195,48199-48200,48202,48210,48214-48215,48219-48220,48223,48226-48227,48229,48231,48237,48250-48252,48254,48263,48266-48267,48269,48272-48273,48278,48281,48283-48286,48291-48292,48295,48298,48301-48302,48304-48305,48307,48319,48325,48328-48329,48331,48334,48337,48339-48340,48343,48350,48355,48358,48361-48362,48368,48370,48388,48391-48393,48400,48403-48404,48406,48411-48413,48415,48417,48419,48429,48435-48436,48454-48455,48459,48462,48464-48465,48469,48473,48485,48488,48501,48512-48513,48517-48518,48640-48641,48648,48656-48658,48672,48877,48883-48885,48890,48894,48959,49005-49010,49012,49016,49018-49019,49030,49034,49038-49039,49043,49045-49047,49049-49051,49054,49057,49060-49061,49065,49070,49073,49080,49082,49088,49090-49091,49101-49103,49108-49109,49111-49114,49120-49122,49126,49129,49132,49140,49142,49144,49146-49147,49151', + NULL); +-- seed shared_buffers +VACUUM ANALYZE moc1; +SELECT length(coverage::text) FROM moc1; + length +-------- + 82727 +(1 row) + +-- verify that equality doesn't read the whole toasted value +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage = '0/'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=0.00 loops=1) + Filter: (coverage = '0/'::smoc) + Rows Removed by Filter: 1 + Buffers: shared hit=3 +(4 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage && '0/'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=0.00 loops=1) + Filter: (coverage && '0/'::smoc) + Rows Removed by Filter: 1 + Buffers: shared hit=3 +(4 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage && '0/1'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=1.00 loops=1) + Filter: (coverage && '0/1'::smoc) + Buffers: shared hit=25 +(3 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage && '0/0-11'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=1.00 loops=1) + Filter: (coverage && '0/0-11'::smoc) + Buffers: shared hit=3 +(3 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage @> '0/'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=1.00 loops=1) + Filter: (coverage @> '0/'::smoc) + Buffers: shared hit=3 +(3 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage <@ '0/'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=0.00 loops=1) + Filter: (coverage <@ '0/'::smoc) + Rows Removed by Filter: 1 + Buffers: shared hit=3 +(4 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage @> '0/1'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=0.00 loops=1) + Filter: (coverage @> '0/1'::smoc) + Rows Removed by Filter: 1 + Buffers: shared hit=25 +(4 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage <@ '0/1'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=0.00 loops=1) + Filter: (coverage <@ '0/1'::smoc) + Rows Removed by Filter: 1 + Buffers: shared hit=3 +(4 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage @> '0/0-11'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=0.00 loops=1) + Filter: (coverage @> '0/0-11'::smoc) + Rows Removed by Filter: 1 + Buffers: shared hit=3 +(4 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT coverage FROM moc1 WHERE coverage <@ '0/0-11'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc1 (cost=0.00..1.01 rows=1 width=18) (actual rows=1.00 loops=1) + Filter: (coverage <@ '0/0-11'::smoc) + Buffers: shared hit=3 +(3 rows) + +SELECT smoc_degrade(4, coverage) FROM moc1; + smoc_degrade +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 0/3 8-9 1/2-3 5 7 9 11 20 29 31 40 42 44-45 2/5-7 25-27 32-33 35 41-43 64-66 68-69 74-75 77-79 84-86 89-92 96-97 101 103-104 106 109-111 115 121-123 164-166 172 184-186 188 3/0-1 10-11 13-15 17-19 64 66 69 71 77-79 97-99 136-137 139 161-163 268-270 280 295 306-307 348-350 353-355 372 376 383 393-396 398 409 411 420 422 433 435 448 455 459 481-483 668-670 696 701 703 748-750 756-757 766-767 4/8-10 12 16-18 30-31 38-39 49-51 67 260 262 268 281 283 288 290 301 303 305-307 387 552-553 555 640 642-643 1084-1085 1124-1126 1136-1137 1150-1153 1166-1167 1177-1179 1218-1219 1221-1223 1404-1406 1408-1409 1411 1492 1496 1508 1512 1525-1527 1529-1531 1568 1570-1571 1588 1590 1596 1598 1600 1602 1613 1615 1712 1714 1725 1727 1729 1731 1737-1739 1796-1798 1800-1802 1815 1819 1824 1831 1835 1921-1923 2768-2770 2781-2783 2788 2792 2794-2795 2803 2809 2811 3004 3032 3040-3042 3054-3055 3059 3062-3063 +(1 row) + diff --git a/expected/moc_options.out b/expected/moc_options.out index 2342b79..386f433 100644 --- a/expected/moc_options.out +++ b/expected/moc_options.out @@ -2,7 +2,7 @@ create table moc_opt (m smoc); insert into moc_opt select format('9/%s', i)::smoc from generate_series(1, 1000) g(i); analyze moc_opt; create index moc_opt5 on moc_opt using gin (m); -explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1'; +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; QUERY PLAN --------------------------------------------------------------- Bitmap Heap Scan on moc_opt (actual rows=1 loops=1) @@ -15,7 +15,7 @@ explain (analyze, costs off, timing off, summary off) select * from moc_opt wher drop index moc_opt5; create index moc_opt8 on moc_opt using gin (m smoc_gin_ops_fine); -explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1'; +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; QUERY PLAN ------------------------------------------------------------- Bitmap Heap Scan on moc_opt (actual rows=1 loops=1) @@ -28,7 +28,7 @@ explain (analyze, costs off, timing off, summary off) select * from moc_opt wher drop index moc_opt8; create index moc_opt9 on moc_opt using gin (m smoc_gin_ops (order = 9)); -explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1'; +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; QUERY PLAN ------------------------------------------------------------- Bitmap Heap Scan on moc_opt (actual rows=1 loops=1) diff --git a/expected/moc_options_1.out b/expected/moc_options_1.out new file mode 100644 index 0000000..55d1fd9 --- /dev/null +++ b/expected/moc_options_1.out @@ -0,0 +1,43 @@ +create table moc_opt (m smoc); +insert into moc_opt select format('9/%s', i)::smoc from generate_series(1, 1000) g(i); +analyze moc_opt; +create index moc_opt5 on moc_opt using gin (m); +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; + QUERY PLAN +------------------------------------------------------------------ + Bitmap Heap Scan on moc_opt (actual rows=1.00 loops=1) + Recheck Cond: (m && '9/1'::smoc) + Rows Removed by Index Recheck: 254 + Heap Blocks: exact=4 + -> Bitmap Index Scan on moc_opt5 (actual rows=255.00 loops=1) + Index Cond: (m && '9/1'::smoc) + Index Searches: 1 +(7 rows) + +drop index moc_opt5; +create index moc_opt8 on moc_opt using gin (m smoc_gin_ops_fine); +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; + QUERY PLAN +---------------------------------------------------------------- + Bitmap Heap Scan on moc_opt (actual rows=1.00 loops=1) + Recheck Cond: (m && '9/1'::smoc) + Rows Removed by Index Recheck: 2 + Heap Blocks: exact=1 + -> Bitmap Index Scan on moc_opt8 (actual rows=3.00 loops=1) + Index Cond: (m && '9/1'::smoc) + Index Searches: 1 +(7 rows) + +drop index moc_opt8; +create index moc_opt9 on moc_opt using gin (m smoc_gin_ops (order = 9)); +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; + QUERY PLAN +---------------------------------------------------------------- + Bitmap Heap Scan on moc_opt (actual rows=1.00 loops=1) + Recheck Cond: (m && '9/1'::smoc) + Heap Blocks: exact=1 + -> Bitmap Index Scan on moc_opt9 (actual rows=1.00 loops=1) + Index Cond: (m && '9/1'::smoc) + Index Searches: 1 +(6 rows) + diff --git a/expected/selectivity.out b/expected/selectivity.out index e694f0f..44a25e3 100644 --- a/expected/selectivity.out +++ b/expected/selectivity.out @@ -9,7 +9,8 @@ create or replace function explain(query text, do_analyze text default 'true') r declare line text; begin - for line in execute format('explain (analyze %s, timing off, summary off) %s', do_analyze, query) loop + for line in execute format('explain (analyze %s, timing off, summary off, buffers off) %s', do_analyze, query) loop + continue when (line ~ ' +Index Searches: .*'); return next regexp_replace(line, 'cost=\S+ ', ''); end loop; return; diff --git a/expected/selectivity_1.out b/expected/selectivity_1.out index 08cd8f7..1d89c0d 100644 --- a/expected/selectivity_1.out +++ b/expected/selectivity_1.out @@ -9,7 +9,8 @@ create or replace function explain(query text, do_analyze text default 'true') r declare line text; begin - for line in execute format('explain (analyze %s, timing off, summary off) %s', do_analyze, query) loop + for line in execute format('explain (analyze %s, timing off, summary off, buffers off) %s', do_analyze, query) loop + continue when (line ~ ' +Index Searches: .*'); return next regexp_replace(line, 'cost=\S+ ', ''); end loop; return; diff --git a/expected/selectivity_2.out b/expected/selectivity_2.out new file mode 100644 index 0000000..89b3974 --- /dev/null +++ b/expected/selectivity_2.out @@ -0,0 +1,125 @@ +-- test selectivity estimator functions +create table spoint10k (star spoint); +insert into spoint10k select spoint(i, i*i) from generate_series(1, 10000) g(i); +create index on spoint10k using gist (star); +analyze spoint10k; +-- "explain analyze" wrapper that removes 'cost=...' since it varies across architectures +-- (we can't use "costs off" since that also removes the estimated row count) +create or replace function explain(query text, do_analyze text default 'true') returns setof text language plpgsql as $$ +declare + line text; +begin + for line in execute format('explain (analyze %s, timing off, summary off, buffers off) %s', do_analyze, query) loop + continue when (line ~ ' +Index Searches: .*'); + return next regexp_replace(line, 'cost=\S+ ', ''); + end loop; + return; +end; +$$; +-- <@ operator selectivity +select explain('select * from spoint10k where star <@ scircle(spoint(1,1), 1)'); + explain +-------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on spoint10k (rows=2298 width=16) (actual rows=3009.00 loops=1) + Recheck Cond: (star <@ '<(1 , 1) , 1>'::scircle) + Rows Removed by Index Recheck: 1560 + Heap Blocks: exact=55 + -> Bitmap Index Scan on spoint10k_star_idx (rows=2298 width=0) (actual rows=4569.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 1>'::scircle) +(6 rows) + +select explain('select * from spoint10k where star <@ scircle(spoint(1,1), .1)'); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on spoint10k (rows=25 width=16) (actual rows=29.00 loops=1) + Recheck Cond: (star <@ '<(1 , 1) , 0.1>'::scircle) + Rows Removed by Index Recheck: 19 + Heap Blocks: exact=32 + -> Bitmap Index Scan on spoint10k_star_idx (rows=25 width=0) (actual rows=48.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.1>'::scircle) +(6 rows) + +select explain('select * from spoint10k where star <@ scircle(spoint(1,1), .01)'); + explain +------------------------------------------------------------------------------------------------ + Index Scan using spoint10k_star_idx on spoint10k (rows=1 width=16) (actual rows=1.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.01>'::scircle) +(2 rows) + +select explain('select * from spoint10k where scircle(spoint(1,1), 1) @> star'); + explain +-------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on spoint10k (rows=2298 width=16) (actual rows=3009.00 loops=1) + Recheck Cond: ('<(1 , 1) , 1>'::scircle @> star) + Rows Removed by Index Recheck: 1560 + Heap Blocks: exact=55 + -> Bitmap Index Scan on spoint10k_star_idx (rows=2298 width=0) (actual rows=4569.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 1>'::scircle) +(6 rows) + +select explain('select * from spoint10k where scircle(spoint(1,1), .1) @> star'); + explain +---------------------------------------------------------------------------------------------- + Bitmap Heap Scan on spoint10k (rows=25 width=16) (actual rows=29.00 loops=1) + Recheck Cond: ('<(1 , 1) , 0.1>'::scircle @> star) + Rows Removed by Index Recheck: 19 + Heap Blocks: exact=32 + -> Bitmap Index Scan on spoint10k_star_idx (rows=25 width=0) (actual rows=48.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.1>'::scircle) +(6 rows) + +select explain('select * from spoint10k where scircle(spoint(1,1), .01) @> star'); + explain +------------------------------------------------------------------------------------------------ + Index Scan using spoint10k_star_idx on spoint10k (rows=1 width=16) (actual rows=1.00 loops=1) + Index Cond: (star <@ '<(1 , 1) , 0.01>'::scircle) +(2 rows) + +select explain('select * from spoint10k where star !<@ scircle(spoint(1,1), 1)'); + explain +--------------------------------------------------------------------------- + Seq Scan on spoint10k (rows=7702 width=16) (actual rows=6991.00 loops=1) + Filter: (star !<@ '<(1 , 1) , 1>'::scircle) + Rows Removed by Filter: 3009 +(3 rows) + +select explain('select * from spoint10k where star !<@ scircle(spoint(1,1), .1)'); + explain +--------------------------------------------------------------------------- + Seq Scan on spoint10k (rows=9975 width=16) (actual rows=9971.00 loops=1) + Filter: (star !<@ '<(1 , 1) , 0.1>'::scircle) + Rows Removed by Filter: 29 +(3 rows) + +select explain('select * from spoint10k where star !<@ scircle(spoint(1,1), .01)'); + explain +---------------------------------------------------------------------------- + Seq Scan on spoint10k (rows=10000 width=16) (actual rows=9999.00 loops=1) + Filter: (star !<@ '<(1 , 1) , 0.01>'::scircle) + Rows Removed by Filter: 1 +(3 rows) + +select explain('select * from spoint10k where scircle(spoint(1,1), 1) !@> star'); + explain +--------------------------------------------------------------------------- + Seq Scan on spoint10k (rows=7702 width=16) (actual rows=6991.00 loops=1) + Filter: ('<(1 , 1) , 1>'::scircle !@> star) + Rows Removed by Filter: 3009 +(3 rows) + +select explain('select * from spoint10k where scircle(spoint(1,1), .1) !@> star'); + explain +--------------------------------------------------------------------------- + Seq Scan on spoint10k (rows=9975 width=16) (actual rows=9971.00 loops=1) + Filter: ('<(1 , 1) , 0.1>'::scircle !@> star) + Rows Removed by Filter: 29 +(3 rows) + +select explain('select * from spoint10k where scircle(spoint(1,1), .01) !@> star'); + explain +---------------------------------------------------------------------------- + Seq Scan on spoint10k (rows=10000 width=16) (actual rows=9999.00 loops=1) + Filter: ('<(1 , 1) , 0.01>'::scircle !@> star) + Rows Removed by Filter: 1 +(3 rows) + diff --git a/sql/moc_options.sql b/sql/moc_options.sql index 5041f65..f697ffd 100644 --- a/sql/moc_options.sql +++ b/sql/moc_options.sql @@ -3,12 +3,12 @@ insert into moc_opt select format('9/%s', i)::smoc from generate_series(1, 1000) analyze moc_opt; create index moc_opt5 on moc_opt using gin (m); -explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1'; +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; drop index moc_opt5; create index moc_opt8 on moc_opt using gin (m smoc_gin_ops_fine); -explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1'; +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; drop index moc_opt8; create index moc_opt9 on moc_opt using gin (m smoc_gin_ops (order = 9)); -explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1'; +explain (analyze, costs off, timing off, summary off, buffers off) select * from moc_opt where m && '9/1'; diff --git a/sql/selectivity.sql b/sql/selectivity.sql index d0f1d6e..7601714 100644 --- a/sql/selectivity.sql +++ b/sql/selectivity.sql @@ -11,7 +11,8 @@ create or replace function explain(query text, do_analyze text default 'true') r declare line text; begin - for line in execute format('explain (analyze %s, timing off, summary off) %s', do_analyze, query) loop + for line in execute format('explain (analyze %s, timing off, summary off, buffers off) %s', do_analyze, query) loop + continue when (line ~ ' +Index Searches: .*'); return next regexp_replace(line, 'cost=\S+ ', ''); end loop; return; From 146276053f9da84bbf0073406d2cad20799caca3 Mon Sep 17 00:00:00 2001 From: Ed Sabol <22986767+esabol@users.noreply.github.com> Date: Wed, 8 Oct 2025 20:58:01 -0400 Subject: [PATCH 17/21] Fix compiler warnings about missing variable declarations --- src/sbuffer.c | 22 +++++++++++----------- src/sbuffer.h | 4 +++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/sbuffer.c b/src/sbuffer.c index 7a62281..6030c68 100644 --- a/src/sbuffer.c +++ b/src/sbuffer.c @@ -7,10 +7,10 @@ #define MAX_BUF_ANGLE 20 /* The type of parsed spherical object. */ -unsigned char spheretype; +static unsigned char spheretype; /* The angle buffer. */ -float8 bufangle[MAX_BUF_ANGLE]; +static float8 bufangle[MAX_BUF_ANGLE]; /* A simple spherical point. */ typedef struct @@ -20,29 +20,29 @@ typedef struct } bpoint; /* Spherical point buffer. */ -struct +static struct { int m; /* count of buffered points */ bpoint *p; /* pointer to array of points */ } bufpoints; /* ID of line's length angle. */ -int bufline; +static int bufline; /* * First element is the ID of spherical point ( center ). * Second element is the ID of radius angle. */ -int bufcircle[2]; +static int bufcircle[2]; /* Buffer of ellipse. */ -int bufellipse[5]; +static int bufellipse[5]; /* Buffer of IDs of Euler transformation values. */ -int bufeuler[3]; +static int bufeuler[3]; /* Structure to buffer the axes of Euler transformation. */ -struct +static struct { unsigned char phi, /* first axis */ theta, /* second axis */ @@ -50,13 +50,13 @@ struct } bufeulertype; /* Current angle ID. */ -int bufapos; +static int bufapos; /* Current point ID. */ -int bufspos; +static int bufspos; /* Pointer to input buffer. */ -char *parse_buffer; +static char *parse_buffer; void diff --git a/src/sbuffer.h b/src/sbuffer.h index b16f152..cfeafd4 100644 --- a/src/sbuffer.h +++ b/src/sbuffer.h @@ -17,7 +17,9 @@ #define EULER_AXIS_Y 2 /* y - axis for Euler transformation */ #define EULER_AXIS_Z 3 /* z - axis for Euler transformation */ -extern int sphere_yylex(); +extern int sphere_yychar; +extern int sphere_yynerrs; +extern int sphere_yylex(); extern void sphere_yyerror(const char *str); extern void sphere_flush_scanner_buffer(void); From ef9f7802e0a961b27b72e38b9a632051b78e5b76 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Wed, 15 Oct 2025 20:51:40 +0300 Subject: [PATCH 18/21] Fix Deploy Docs action --- .github/workflows/deploy-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 2047a36..bbd10e5 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -42,7 +42,7 @@ jobs: uses: actions/configure-pages@v3 - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v4 with: path: 'doc/html' From eeaf1d733ceac28a4397a8f5156890e7d3558bb0 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Thu, 16 Oct 2025 17:45:36 +0300 Subject: [PATCH 19/21] Fix doc deployment --- .github/workflows/deploy-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index bbd10e5..dcfb46d 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -48,4 +48,4 @@ jobs: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 From 5457452dc9a5ad12881ec760448d370389a66e46 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Thu, 16 Oct 2025 17:46:26 +0300 Subject: [PATCH 20/21] Set doc deployment on release publication The docs should be deployed when a new release is publishing. There is no point to deploy the docs every time when the master branch is updated. The proposed change sets automatic doc deployment only on a new release publication or manually. --- .github/workflows/deploy-docs.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index dcfb46d..c4a9466 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,10 +1,10 @@ name: Build and Deploy Docs -# Deploy docs only for master +# Deploy docs when a new release is published or manually on: - push: - branches: - - "master" + release: + types: [published] + workflow_dispatch: # Allow deployment to GitHub Pages permissions: From 36db9b9e084bb5933bf253f5d161299e54d36ca3 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Mon, 20 Oct 2025 10:09:54 +0300 Subject: [PATCH 21/21] Fix upgrade script generation from 1.5.1 to 1.5.2 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 782961c..3b0e233 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,8 @@ DATA_built = $(RELEASE_SQL) \ pg_sphere--1.4.0--1.4.1.sql \ pg_sphere--1.4.1--1.4.2.sql \ pg_sphere--1.4.2--1.5.0.sql \ - pg_sphere--1.5.0--1.5.1.sql + pg_sphere--1.5.0--1.5.1.sql \ + pg_sphere--1.5.1--1.5.2.sql DOCS = README.pg_sphere COPYRIGHT.pg_sphere TESTS = version tables points euler circle line ellipse poly path box \